Week 7 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 7 spec.

How to use this

Run python tools/test.py --compiler PATH --week 7 -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.

testkindwhat it checksbugs known to fail it
render/r_gemm_tiled_12x24x7rendera 12x24 by 7 GEMM: thread over 4-row blocks, a 4x8 private tile, upcast loops. Same bits as matmul.upcast unrolls one copy short
render/r_gemm_tiled_4x8x2rendera 4x8 by 2 GEMM: thread over 4-row blocks, a 4x8 private tile, upcast loops. Same bits as matmul.upcast unrolls one copy short
render/r_gemm_tiled_8x16x5rendera 8x16 by 5 GEMM: thread over 4-row blocks, a 4x8 private tile, upcast loops. Same bits as matmul.upcast unrolls one copy short
render/r_thread_captures_valuesrenderthe outlined body needs values computed outside it: a scale loaded before the loop, and the outer rangenone recorded
render/r_thread_inside_looprendera thread loop inside a plain loop, renderednone recorded
render/r_thread_private_allocrenderprivate allocs: each call of the outlined body starts from zerosrender private allocs shared
thread rendered as a plain loop
render/r_thread_rowsumrendera thread loop rendered: the harness runs it with uir_parallel_fornone recorded
render/r_thread_zero_tripsrenderzero iterations: the buffer is untouchednone recorded
render/r_upcast_sum_orderrenderan unrolled f32 sum keeps its orderupcast unrolls one copy short
render/s_gemm_768_threadsrender, speed 0.5thread loops alone (no upcast): at least half the reference's speedrender private allocs shared
thread rendered as a plain loop
render/s_gemm_768_threads_and_upcastrender, speed 0.5the full schedule: at least half the reference's speed. Ignoring the thread axis is about 8 times too slow.render private allocs shared
thread rendered as a plain loop
upcast rendered as a plain loop
upcast unrolls one copy short
render/s_gemm_768_upcastrender, speed 0.65one thread, upcast tile only: at least 0.65 of the reference's speed. Rendering upcast loops as plain loops is too slow.upcast rendered as a plain loop
upcast unrolls one copy short
run/axis_loop_is_defaultrun: passaxis=loop is the same as no axis at allnone recorded
run/axis_thread_same_resultrun: passa thread loop computes exactly what a plain loop doesnone recorded
run/axis_thread_wrong_valuerun: assert_failand a wrong expected value still failsnone recorded
run/axis_upcast_same_orderrun: passupcast unrolls but keeps the order: the f32 sum (with 1e8 and -1e8 in it) has the same bitsnone recorded
run/err_axis_unknownrun: invalidaxis is loop, upcast or threadnone recorded
run/err_thread_alloc_sharedrun: invalidan alloc that is also used after the loop is shared, so writing its element 0 from every iteration racesnone recorded
run/err_thread_load_neighborrun: invalida load of memory the loop writes must stay in its own slice too: reading o[r + 1] races with iteration r + 1thread loads unchecked
run/err_thread_mixed_stridesrun: invalideach access alone stays in a slice, o[2r] then o[r], but iteration 2 writes o[2] and so does iteration 1: one stride per buffermixed strides allowed
run/err_thread_nestedrun: invalida thread loop inside another thread loop, even when each access rule holds (the outer loop runs once)nested thread loops allowed
run/err_thread_store_negativerun: invalidthe rest of the offset may not go below the slice: 4r - 1none recorded
run/err_thread_store_not_literal_striderun: invalidthe stride must be a literalnone recorded
run/err_thread_store_overlaprun: invalido[2r + j] with j up to 3 reaches the next iteration's slicenone recorded
run/err_thread_store_r_twicerun: invalidr may appear in one term onlynone recorded
run/err_thread_store_sharedrun: invalidevery iteration writes o[j]: a racenone recorded
run/err_thread_vector_store_overflowsrun: invalida 2-element store at 4r + j, j up to 3, spills into the next slicethread slice ignores the access size
run/err_upcast_not_literalrun: invalidan upcast bound is a literal: the loop is copied that many timesupcast bound unchecked
run/err_upcast_too_bigrun: invalidupcast bounds go up to 32upcast bound unchecked
run/err_upcast_zerorun: invalidan upcast bound is at least 1upcast bound unchecked
run/loop_alloc_carries_overrun: passthe same program as a plain loop carries the alloc across iterations: running sumsnone recorded
run/thread_alloc_indexed_by_rrun: passa shared alloc is fine when each iteration writes its own elementnone recorded
run/thread_inside_looprun: passa thread loop inside a plain loop: each pass of the outer loop runs it againnone recorded
run/thread_private_alloc_freshrun: passan alloc used only inside a thread loop starts at zero in every iteration: out[r] = 0 + rprivate allocs never reset
run/thread_private_alloc_not_cumulativerun: assert_failso a thread loop does not give running sumsprivate allocs never reset
run/thread_reads_any_inputrun: passmemory the loop never writes may be read anywhere: each iteration sums all of xnone recorded
run/thread_store_own_slicerun: passiteration r writes o[4r + j], j in [0, 3]: its own slicenone recorded
run/thread_store_stride_firstrun: passthe literal may come first: mul 4 rnone recorded
run/thread_zero_tripsrun: passa thread loop that runs zero times is finenone recorded
run/upcast_bound_32run: pass32 is allowednone recorded
run/upcast_inside_threadrun: passupcast loops inside a thread loop, writing o[4r + u]none recorded