Week 6 test guide
A test failed and you don't know why? Find it here: what it checks, and the plausible bugs that are known to fail it. Then read the matching part of the week 6 spec.
How to use this
Run python tools/test.py --compiler PATH --week 6 -v, copy the failing test's name, and search below. "Bugs known to fail it" lists mistakes that were planted in the reference compiler and caught by this test, so one of them is a good first guess. It's not a complete list, and the debugging guide covers what to do when none fit.
| test | kind | what it checks | bugs known to fail it |
|---|---|---|---|
render/mnist_train | render, slot 4 >= 850 | softmax regression on MNIST: 50 steps of 100 images, learning rate 1.0, then 1000 test digits | none recorded |
render/r_bitcast | render | bitcast both ways. A NaN made by 0 * inf must still come out as 0x7fc00000 | end doesn't close its range final version not followed render bitcast nan not canonical render elementwise at 0 render expand zero render load at offset 0 render loop starts at 1 render skips rangeify render store loop short |
render/r_exp2 | render | exp2 over 64 values, special ones first: your C must match the spec bit for bit | C float literals 6 digits C where swapped end doesn't close its range exp2 clamps at -126 exp2 nan becomes 1 exp2 rounds n down exp2 series one term short final version not followed floor truncates no hash consing render elementwise at 0 render load at offset 0 render loop starts at 1 render skips rangeify render store loop short |
render/r_exp_log | render | exp then log: the sugar, rendered | C cmplt as <= C float literals 6 digits C where swapped end doesn't close its range exp uses ln 2 exp2 clamps at -126 exp2 nan becomes 1 exp2 rounds n down exp2 series one term short final version not followed floor truncates log2 no sqrt2 fold log2 zero gives nan no hash consing render elementwise at 0 render expand zero render load at offset 0 render skips rangeify render store loop short |
render/r_floor | render | floor in C, past 2^23 included | C cmplt as <= C where swapped end doesn't close its range final version not followed floor casts big values floor truncates render elementwise at 0 render expand zero render load at offset 0 render loop starts at 1 render skips rangeify |
render/r_grad_movement | render | a gradient through pad, shrink, permute and expand, rendered as loops | C cmplt as <= end doesn't close its range final version not followed grad expand takes the max grad pad shrinks from the right grad seed is 2 grad shrink pads swapped render elementwise at 0 render expand reads i render flat_of order render load at offset 0 render loop starts at 1 render loop uses <= render pad shift wrong side render permute inverse render reduce from zero render reduce of a broadcast hoisted render shrink offset sign render skips rangeify render store loop short render unflat stride values hoisted to outer loops |
render/r_grad_regression_step | render | one gradient step of least squares: w -= 0.1 * d/dw mean((Xw - y)^2) | end doesn't close its range final version not followed grad expand takes the max grad mul shares swapped grad seed is 2 loads never move into loops loads not before stores matmul without transpose nesting demands every range render elementwise at 0 render expand reads i render expand zero render flat_of order render in-place store fused render load at offset 0 render loop starts at 1 render loop uses <= render reduce from zero render skips rangeify render stage reads x[0] render store loop short render unflat stride values hoisted to outer loops |
render/r_grad_softmax | render | the gradient of a 4-row log-softmax loss with respect to its logits | C float literals 6 digits C where swapped end doesn't close its range exp uses ln 2 exp2 rounds n down exp2 series one term short final version not followed floor truncates grad detach ignored grad exp2 forgets ln 2 grad log2 forgets ln 2 grad mul shares swapped grad seed is 2 loads never move into loops no hash consing render elementwise at 0 render expand reads i render expand zero render flat_of order render load at offset 0 render loop starts at 1 render loop uses <= render reduce from zero render reduce reversed render skips rangeify render store loop short render unflat stride values hoisted to outer loops |
render/r_log2 | render | log2 over 64 values, special ones first: your C must match the spec bit for bit | C cmplt as <= C where swapped end doesn't close its range final version not followed log2 no sqrt2 fold log2 subnormals not scaled log2 zero gives nan no hash consing render elementwise at 0 render load at offset 0 render loop starts at 1 render skips rangeify render store loop short |
render/r_matmul_8x16x8 | render | matmul sugar, rendered: the fold order is k = 0, 1, ..., 15 | end doesn't close its range final version not followed loads never move into loops matmul without transpose render elementwise at 0 render expand reads i render flat_of order render load at offset 0 render loop starts at 1 render loop uses <= render reduce from zero render reduce reversed render skips rangeify render store loop short render unflat stride values hoisted to outer loops |
render/r_scalar_math | render | scalar math stays loopless C | C float literals 6 digits C where swapped exp2 series one term short final version not followed sin one-part 2pi |
render/r_sin | render | sin over 64 values, special ones first: your C must match the spec bit for bit | C float literals 6 digits C where swapped end doesn't close its range final version not followed floor truncates no hash consing render elementwise at 0 render load at offset 0 render skips rangeify render store loop short sin no fold sin one-part 2pi sin series one term short |
render/r_sqrt | render | sqrt over 64 values, special ones first: your C must match the spec bit for bit | C cmplt as <= C float literals 6 digits C where swapped end doesn't close its range exp2 rounds n down final version not followed log2 no sqrt2 fold log2 subnormals not scaled no hash consing render elementwise at 0 render load at offset 0 render skips rangeify render store loop short sqrt -0.0 loses its sign sqrt no Newton step |
render/r_sugar_mix | render | sub, neg, fdiv, relu and cmpeq in one kernel | C cmplt as <= C where swapped cmpeq is cmplt end doesn't close its range final version not followed neg is identity relu clamps at 1 render elementwise at 0 render expand zero render load at offset 0 render loop starts at 1 render skips rangeify render store loop short |
render/r_url_check | render, slot 1 >= 100 | a threshold test: the sum of a file ramp, stored in slot 1, must reach 100 | end doesn't close its range final version not followed loads never move into loops render expand zero render skips rangeify |
render/r_url_input | render | the harness fills a url= buffer from its file before calling your kernel | C float literals 6 digits C where swapped end doesn't close its range exp uses ln 2 exp2 rounds n down exp2 series one term short final version not followed floor truncates no hash consing render elementwise at 0 render expand zero render load at offset 0 render loop starts at 1 render skips rangeify render store loop short |
run/bitcast_known_bits | run: pass | bitcast reads the same 32 bits as the other type | f32 consts not rounded |
run/bitcast_nan_canonical | run: pass | every NaN bitcasts to 0x7fc00000, however it was made | none recorded |
run/bitcast_nan_from_bits | run: pass | a NaN with sign and payload, made from bits, still bitcasts back to 0x7fc00000 | bitcast nan not canonical |
run/bitcast_round_trip | run: pass | i32 to f32 and back keeps every non-NaN pattern | elementwise uses x[0] evaluates everything |
run/bitcast_same_type | run: pass | bitcast to its own type changes nothing | none recorded |
run/bitcast_to_float | run: pass | i32 patterns read as f32 | elementwise uses x[0] evaluates everything |
run/detach_is_identity | run: pass | detach changes no value, of any dtype | none recorded |
run/err_bitcast_bool | run: invalid | bitcast works on i32 and f32 only | none recorded |
run/err_bitcast_no_dtype | run: invalid | bitcast needs dtype= | none recorded |
run/err_bitcast_to_bool | run: invalid | bitcast to bool is invalid | none recorded |
run/err_cmpeq_f32 | run: invalid | cmpeq is for i32 and bool (f32 equality has NaN to think about) | none recorded |
run/err_cmpeq_mixed | run: invalid | cmpeq needs one dtype | none recorded |
run/err_detach_memory | run: invalid | detach takes a value, not memory | memory as ALU operand ok |
run/err_exp_i32 | run: invalid | exp of an i32 | none recorded |
run/err_fdiv_i32 | run: invalid | fdiv is f32 only: i32 division is div | none recorded |
run/err_grad_arity | run: invalid | gradient takes a loss and one x | none recorded |
run/err_grad_in_loop | run: invalid | no gradients inside a loop | none recorded |
run/err_grad_loss_i32 | run: invalid | the loss must be f32 | none recorded |
run/err_grad_loss_not_scalar | run: invalid | the loss must be a scalar | none recorded |
run/err_grad_reduce_mul | run: invalid | reduce op=mul has no gradient rule | none recorded |
run/err_grad_symbolic_shrink | run: invalid | a value shrink with a computed offset has no gradient rule | none recorded |
run/err_grad_through_call | run: invalid | gradients do not go through call | none recorded |
run/err_grad_through_store_load | run: invalid | a store and a load on the path: memory is not differentiable | none recorded |
run/err_grad_wrt_i32 | run: invalid | x must be f32 | none recorded |
run/err_grad_wrt_literal | run: invalid | equal literals are one shared node: no gradient with respect to 2.0 | grad wrt literal allowed |
run/err_grad_wrt_memory | run: invalid | x must be a value, not a buffer | none recorded |
run/err_math_bool | run: invalid | log2 of a bool | none recorded |
run/err_math_i32 | run: invalid | math ops are f32 only | none recorded |
run/err_math_two_operands | run: invalid | sqrt takes one operand | none recorded |
run/err_matmul_inner_mismatch | run: invalid | matmul (2x3) by (2x3) | none recorded |
run/err_matmul_rank1 | run: invalid | matmul takes rank-2 operands | none recorded |
run/err_relu_bool | run: invalid | relu of a bool | none recorded |
run/err_sha_without_url | run: invalid | sha256= needs url= | none recorded |
run/err_sugar_arity | run: invalid | neg takes one operand | none recorded |
run/err_url_and_data | run: invalid | data= and url= together | url with data allowed |
run/err_url_bool_bytes | run: invalid | bool bytes must be 0 or 1 | url bool bytes unchecked |
run/err_url_dotdot | run: invalid | relative paths may not climb out with .. | none recorded |
run/err_url_file_too_long | run: invalid | the file holds 5 f32, the buffer wants 4: extra bytes are an error too | url size unchecked |
run/err_url_missing_file | run: invalid | no such file | none recorded |
run/err_url_sha_mismatch | run: invalid | the file does not match its sha256 | url sha unchecked |
run/err_url_size_mismatch | run: invalid | the file holds 5 f32, the buffer wants 6 | none recorded |
run/err_url_without_sha | run: invalid | url= needs sha256= | none recorded |
run/err_url_wrong_dtype_size | run: invalid | 20 bytes are 5 f32 but 20 bool: as bool they are not 0 or 1 | url bool bytes unchecked |
run/exp2_bits | run: pass | exp2 of fractions, bit for bit: the exact steps of the spec | elementwise uses x[0] evaluates everything exp2 rounds n down exp2 series one term short f32 consts not rounded f32 ops not rounded floor truncates global memo across calls where branches swapped xor bool is equality |
run/exp2_bits_one_ulp_off | run: assert_fail | the expected values are exp2 with one result moved by one ulp: bits matter | evaluates everything |
run/exp2_integers | run: pass | exp2 of an integer n is exactly 2^n, down into the subnormals | elementwise uses x[0] evaluates everything exp2 clamps at -126 f32 consts not rounded floor truncates global memo across calls where branches swapped xor bool is equality |
run/exp2_specials | run: pass | exp2: inf, -inf, nan, and the clamps at 128 and -150 | NaN != NaN in assert elementwise uses x[0] evaluates everything exp2 clamps at -126 exp2 nan becomes 1 exp2 rounds n down f32 consts not rounded f32 ops not rounded global memo across calls where branches swapped xor bool is equality |
run/exp2_subnormal_results | run: pass | exp2 below -126 lands in the subnormals: 2^h * 2^k keeps it right | elementwise uses x[0] evaluates everything exp2 clamps at -126 f32 consts not rounded f32 ops not rounded floor truncates global memo across calls where branches swapped xor bool is equality |
run/grad_accumulation_order | run: pass | shares are added in the order they arrive (reverse post-order): here that is 3.3e-08, then 0.7, then 0.1 | evaluates everything f32 consts not rounded f32 ops not rounded grad mul shares swapped grad seed is 2 |
run/grad_accumulation_order_inner | run: pass | an inner node with three shares: arrival order (1.0, then 3.1e-08, then 3e-08) gives exactly 1.0 there, so 2.0 at x | evaluates everything f32 ops not rounded grad mul shares swapped grad seed is 2 grad shares added last first |
run/grad_accumulation_other_order | run: assert_fail | adding the same three shares in program order gives different bits | evaluates everything |
run/grad_add_const | run: pass | a constant term has no gradient | evaluates everything grad seed is 2 |
run/grad_bitcast_path_is_zero | run: pass | a bitcast to i32 carries no gradient | evaluates everything grad flows into i32 |
run/grad_cast_f32 | run: pass | a cast from f32 to f32 passes the gradient through | evaluates everything grad seed is 2 |
run/grad_cube | run: pass | d/dx (x*x)*x = 3x^2 | evaluates everything grad mul shares swapped grad seed is 2 |
run/grad_detach | run: pass | detach makes x * detach(x) have gradient detach(x) = x | evaluates everything grad detach ignored grad seed is 2 |
run/grad_exp | run: pass | exp is sugar: its gradient follows the expansion | evaluates everything exp uses ln 2 f32 ops not rounded global memo across calls grad exp2 forgets ln 2 grad mul shares swapped grad seed is 2 where branches swapped xor bool is equality |
run/grad_exp2 | run: pass | d/dx 2^x = 2^x ln 2 | evaluates everything f32 consts not rounded global memo across calls grad exp2 forgets ln 2 grad seed is 2 where branches swapped xor bool is equality |
run/grad_expand_middle_axis | run: pass | expand of a middle axis: the gradient sums along it | elementwise uses x[0] evaluates everything expand reads i not 0 grad expand takes the max grad mul shares swapped grad seed is 2 reduce pops trailing axes reshape column-major |
run/grad_expand_scalar | run: pass | expand of a scalar: its gradient sums every copy | evaluates everything expand reads i not 0 expand scalar is zero grad seed is 2 stage zeroes |
run/grad_fdiv | run: pass | d/dx 1/x through fdiv | evaluates everything grad mul shares swapped grad recip sign grad seed is 2 |
run/grad_floor_is_zero | run: pass | floor goes through i32, so its gradient is zero (for |x| < 2^23) | evaluates everything grad flows into i32 grad where feeds both sides where branches swapped xor bool is equality |
run/grad_index | run: pass | index: the gradient lands at that index only | elementwise uses x[0] evaluates everything expand reads i not 0 grad seed is 2 pad fill not zero reshape column-major |
run/grad_log | run: pass | log is sugar too | evaluates everything f32 ops not rounded grad log2 forgets ln 2 grad mul shares swapped grad seed is 2 |
run/grad_log2 | run: pass | d/dx log2 x = 1 / (x ln 2) | evaluates everything f32 consts not rounded grad log2 forgets ln 2 grad seed is 2 |
run/grad_log_softmax | run: pass | the gradient of a log-softmax loss is softmax minus one-hot | elementwise uses x[0] evaluates everything exp uses ln 2 exp2 rounds n down exp2 series one term short expand reads i not 0 expand scalar is zero f32 consts not rounded f32 ops not rounded floor truncates global memo across calls grad detach ignored grad exp2 forgets ln 2 grad log2 forgets ln 2 grad mul shares swapped grad seed is 2 grad shrink pads swapped neg is identity pad fill not zero pad sides swapped reduce op ignored stage zeroes where branches swapped xor bool is equality |
run/grad_matmul_A | run: pass | matmul: dL/dA = G B^T | elementwise uses x[0] evaluates everything expand reads i not 0 grad expand takes the max grad mul shares swapped grad seed is 2 matmul without transpose permute inverse reduce pops trailing axes reshape column-major |
run/grad_matmul_B | run: pass | matmul: dL/dB = A^T G | elementwise uses x[0] evaluates everything expand reads i not 0 grad expand takes the max grad mul shares swapped grad seed is 2 matmul without transpose reduce pops trailing axes reshape column-major |
run/grad_max_lose | run: pass | max sends nothing to the smaller side | evaluates everything where branches swapped |
run/grad_max_tie | run: pass | max with a tie splits the gradient evenly | cmplt is <= evaluates everything grad max tie goes to a grad seed is 2 where branches swapped |
run/grad_max_win | run: pass | max sends all of it to the larger side | evaluates everything grad seed is 2 where branches swapped |
run/grad_overlapping_shrinks | run: pass | two overlapping windows: their gradients add up | elementwise uses x[0] evaluates everything expand reads i not 0 grad mul shares swapped grad seed is 2 grad shrink pads swapped pad fill not zero pad sides swapped shrink offset sign stage zeroes |
run/grad_pad | run: pass | pad: the gradient is the shrink back to the original window | elementwise uses x[0] evaluates everything expand reads i not 0 grad mul shares swapped grad pad shrinks from the right grad seed is 2 shrink offset sign |
run/grad_permute | run: pass | permute: the gradient goes back through the inverse order | elementwise uses x[0] evaluates everything expand reads i not 0 grad mul shares swapped grad permute not inverted grad seed is 2 permute inverse reshape column-major |
run/grad_recip | run: pass | d/dx 1/x = -1/x^2 | evaluates everything grad recip sign grad seed is 2 |
run/grad_reduce_max_ties | run: pass | reduce max: the gradient is split between tied maxima | bool->num always 1 cmplt is <= elementwise uses x[0] evaluates everything expand reads i not 0 expand scalar is zero grad reduce max ties not split grad seed is 2 reduce op ignored stage zeroes xor bool is equality |
run/grad_reduce_max_unique | run: pass | reduce max: all of it goes to the one maximum | bool->num always 1 cmplt is <= elementwise uses x[0] evaluates everything expand reads i not 0 expand scalar is zero grad seed is 2 reduce op ignored stage zeroes xor bool is equality |
run/grad_reduce_mul_off_path | run: pass | a reduce op=mul that x does not reach is fine | evaluates everything expand reads i not 0 fold from zero grad seed is 2 |
run/grad_reduce_pop2 | run: pass | reduce over two axes, then the rest | elementwise uses x[0] evaluates everything expand reads i not 0 grad seed is 2 reshape column-major |
run/grad_relu_negative | run: pass | relu at a negative input: zero | evaluates everything where branches swapped |
run/grad_relu_zero_tie | run: pass | relu at exactly 0 is a tie with 0.0: half | cmplt is <= evaluates everything grad max tie goes to a grad seed is 2 relu clamps at 1 where branches swapped |
run/grad_second_order | run: pass | a gradient is a graph: d2/dx2 x^3 = 6x | evaluates everything grad mul shares swapped grad seed is 2 |
run/grad_shrink | run: pass | shrink: the gradient is padded back with zeros | elementwise uses x[0] evaluates everything expand reads i not 0 grad seed is 2 pad fill not zero shrink offset sign stage zeroes |
run/grad_sigmoid_chain | run: pass | a longer chain: sigmoid written with exp, fdiv and add | elementwise uses x[0] evaluates everything exp uses ln 2 exp2 rounds n down expand reads i not 0 expand scalar is zero f32 consts not rounded f32 ops not rounded floor truncates global memo across calls grad exp2 forgets ln 2 grad mul shares swapped grad recip sign grad seed is 2 neg is identity stage zeroes where branches swapped xor bool is equality |
run/grad_sin | run: pass | d/dx sin x = cos x, written sin(x + pi/2) | evaluates everything f32 consts not rounded f32 ops not rounded global memo across calls grad seed is 2 grad sin is sin sin no fold where branches swapped xor bool is equality |
run/grad_sqrt | run: pass | d/dx sqrt x = 1 / (2 sqrt x) | bool->num always 1 evaluates everything global memo across calls grad seed is 2 grad sqrt forgets the 2 where branches swapped xor bool is equality |
run/grad_square | run: pass | d/dx x*x = 2x: x is used twice, so two contributions add up | evaluates everything grad seed is 2 |
run/grad_stack | run: pass | stack: each operand gets its own row of the gradient | elementwise uses x[0] evaluates everything expand reads i not 0 grad index pads swapped grad mul shares swapped grad seed is 2 pad fill not zero pad sides swapped |
run/grad_stage | run: pass | stage is the identity for values and for gradients | evaluates everything grad seed is 2 |
run/grad_sub | run: pass | sub is add of a negation | evaluates everything grad mul shares swapped grad seed is 2 |
run/grad_sum_of_squares | run: pass | d/dv sum(v*v) = 2v | elementwise uses x[0] evaluates everything expand reads i not 0 grad seed is 2 stage zeroes |
run/grad_through_int_cast_is_zero | run: pass | a cast to i32 carries no gradient | evaluates everything grad flows into i32 |
run/grad_unused | run: pass | y does not depend on x: the gradient is zero | evaluates everything |
run/grad_value_unchanged | run: pass | taking a gradient leaves the forward value alone | evaluates everything grad seed is 2 |
run/grad_where | run: pass | where sends the gradient to the side it picked | evaluates everything grad seed is 2 where branches swapped |
run/grad_wrong_value | run: assert_fail | d/dx x*x at 3 is 6, not 9 | evaluates everything |
run/grad_wrt_load | run: pass | x may be a load: the weights of a model are | elementwise uses x[0] evaluates everything expand reads i not 0 grad mul shares swapped grad seed is 2 |
run/grad_zero_shape | run: pass | an independent x gets zeros of its own shape | evaluates everything |
run/log2_bits | run: pass | log2, bit for bit, including both sides of the sqrt(2) fold and a subnormal | bool->num always 1 cmplt is <= elementwise uses x[0] evaluates everything f32 consts not rounded f32 ops not rounded global memo across calls log2 no sqrt2 fold log2 subnormals not scaled where branches swapped |
run/log2_bits_one_ulp_off | run: assert_fail | one log2 result moved by one ulp | evaluates everything |
run/log2_powers | run: pass | log2 of a power of two is exact, subnormals included | bool->num always 1 elementwise uses x[0] evaluates everything f32 consts not rounded global memo across calls log2 subnormals not scaled where branches swapped |
run/log2_specials | run: pass | log2: zeros give -inf, negatives nan, inf inf | NaN != NaN in assert bool->num always 1 cmplt is <= elementwise uses x[0] evaluates everything global memo across calls log2 zero gives nan where branches swapped |
run/math_in_loop | run: pass | a math op inside a hand-written loop: 2^0 + 2^1 + 2^2 + 2^3 | alloc not zeroed end doesn't close its range evaluates everything global memo across calls loads never move into loops loop runs one extra time stores under ends unsequenced where branches swapped xor bool is equality |
run/math_rank2 | run: pass | math ops are elementwise at any rank | bool->num always 1 elementwise uses x[0] evaluates everything global memo across calls reshape column-major where branches swapped |
run/math_scalar_literals | run: pass | math ops on literals, the exact cases | bool->num always 1 global memo across calls where branches swapped xor bool is equality |
run/op_name_with_digit | run: invalid | op names may contain digits now, but log10 is not an op | none recorded |
run/sin_bits | run: pass | sin, bit for bit, across several turns | cmplt is <= elementwise uses x[0] evaluates everything f32 consts not rounded f32 ops not rounded floor truncates global memo across calls sin no fold sin one-part 2pi where branches swapped xor bool is equality |
run/sin_bits_one_ulp_off | run: assert_fail | one sin result moved by one ulp | evaluates everything |
run/sin_negative_zero | run: pass | sin(-0.0) keeps the sign | global memo across calls sin one-part 2pi where branches swapped xor bool is equality |
run/sin_specials | run: pass | sin: inf and nan give nan, huge inputs stay in [-1, 1] | NaN != NaN in assert elementwise uses x[0] evaluates everything f32 consts not rounded f32 ops not rounded floor casts big values global memo across calls sin no fold where branches swapped xor bool is equality |
run/sqrt_negative_zero | run: pass | sqrt(-0.0) is -0.0: assert can't see the sign, bitcast can | cmplt is <= global memo across calls sqrt -0.0 loses its sign |
run/sqrt_specials | run: pass | sqrt: negatives nan, inf inf, nan nan | NaN != NaN in assert elementwise uses x[0] evaluates everything global memo across calls where branches swapped |
run/sqrt_values | run: pass | sqrt, bit for bit: squares come out exact | bool->num always 1 cmplt is <= elementwise uses x[0] evaluates everything exp2 rounds n down f32 consts not rounded f32 ops not rounded floor truncates global memo across calls log2 subnormals not scaled sqrt no Newton step where branches swapped xor bool is equality |
run/sugar_cmpeq | run: pass | cmpeq on i32 and on bool | cmpeq is cmplt cmplt is <= elementwise uses x[0] evaluates everything expand scalar is zero where branches swapped |
run/sugar_exp_bits | run: pass | exp x is exp2 (mul x 1.442695), bit for bit | elementwise uses x[0] evaluates everything exp uses ln 2 exp2 clamps at -126 exp2 rounds n down exp2 series one term short expand scalar is zero f32 consts not rounded f32 ops not rounded floor truncates global memo across calls where branches swapped xor bool is equality |
run/sugar_fdiv | run: pass | fdiv is a times recip b: 10 / 3 comes out one ulp above the correctly rounded quotient | f32 consts not rounded f32 ops not rounded |
run/sugar_floor | run: pass | floor: halves, negatives, values past 2^23, inf and nan | NaN != NaN in assert cmplt is <= elementwise uses x[0] evaluates everything expand scalar is zero floor casts big values floor truncates where branches swapped xor bool is equality |
run/sugar_floor_negative_zero | run: pass | floor(-0.0) is +0.0 by this definition | cmplt is <= where branches swapped xor bool is equality |
run/sugar_log_bits | run: pass | log x is mul (log2 x) 0.6931472, bit for bit | bool->num always 1 cmplt is <= elementwise uses x[0] evaluates everything expand scalar is zero f32 consts not rounded f32 ops not rounded global memo across calls log2 zero gives nan where branches swapped |
run/sugar_matmul | run: pass | matmul A (2x3) B (3x2), the week 5 composite | elementwise uses x[0] evaluates everything expand reads i not 0 matmul without transpose reduce pops trailing axes reshape column-major |
run/sugar_matmul_fold_order | run: pass | matmul sums over k in order k = 0, 1, 2: the bits follow | elementwise uses x[0] evaluates everything expand reads i not 0 f32 consts not rounded f32 ops not rounded fold right to left matmul without transpose reduce pops trailing axes reshape column-major |
run/sugar_matmul_i32_wraps | run: pass | matmul on i32 wraps like mul and add | matmul without transpose reduce pops trailing axes |
run/sugar_relu | run: pass | relu is max with zero, on i32 and f32 | NaN != NaN in assert elementwise uses x[0] evaluates everything max ignores NaN relu clamps at 1 |
run/sugar_sub_f32 | run: pass | sub on f32: x - x is +0.0 | neg is identity |
run/sugar_sub_neg_i32_wrap | run: pass | sub and neg on i32 wrap like add and mul | add doesn't wrap mul doesn't wrap |
run/url_bool | run: pass | bool from a file: one byte each | evaluates everything |
run/url_compute | run: pass | file data flows into ordinary ops | evaluates everything url big-endian |
run/url_f32 | run: pass | a buffer read from a file: 5 little-endian f32 | evaluates everything url big-endian |
run/url_i32 | run: pass | i32 from a file | evaluates everything url big-endian |
run/url_store_into | run: pass | a buffer from a file can be written like any other | evaluates everything url big-endian |
run/url_two_buffers_one_file | run: pass | two buffers may read the same file | evaluates everything |