Skip to content

Commit c5a867a

Browse files
Hardcode84claude
andcommitted
Remove ixsimpl git dep and update lit tests for new simplification forms
ixsimpl is now vendored as a subfolder, so the pip git dependency is no longer needed. Updated affine map CHECK lines in gather_to_shared and gemm lit tests to match the new canonical form where `mod` is expanded to `x - (x floordiv N) * N`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ivan Butygin <ivan.butygin@gmail.com>
1 parent e4c3c18 commit c5a867a

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

lit_tests/kernel/wave/gather_to_shared.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@ def repeat(acc: tkl.Register[M, N, tkl.f32]) -> tkl.Register[M, N, tkl.f32]:
329329
print(scaled_gemm.asm)
330330

331331
# CHECK-LABEL: test_gather_to_shared_scaled_dims
332-
# CHECK-DAG: #[[MAP_COL:.*]] = affine_map<()[s0] -> ((s0 floordiv 8) mod 8)>
332+
# CHECK-DAG: #[[MAP_COL:.*]] = affine_map<()[s0] -> (s0 floordiv 8 - (s0 floordiv 64) * 8)>
333333
# CHECK-DAG: #[[MAP_ROW:.*]] = affine_map<()[s0] -> (s0 mod 8)>
334-
# CHECK-DAG: #[[MAP_COL_SCALE:.*]] = affine_map<()[s0] -> ((s0 floordiv 2) mod 2)>
334+
# CHECK-DAG: #[[MAP_COL_SCALE:.*]] = affine_map<()[s0] -> (s0 floordiv 2 - (s0 floordiv 4) * 2)>
335335
# CHECK-DAG: #[[MAP_ROW_SCALE:.*]] = affine_map<()[s0] -> (s0 mod 2)>
336336
# CHECK-DAG: #[[MAP_ROW_SWIZZLED:.*]] = affine_map<()[s0] -> ((s0 mod 64) floordiv 16)>
337337
# CHECK-DAG: #[[MAP_ROW_SWIZZLED_2:.*]] = affine_map<()[s0] -> ((s0 mod 64) floordiv 16 + 4)>

lit_tests/kernel/wave/gemm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def repeat(acc: tkl.Register[M, N, tkl.f32]) -> tkl.Register[M, N, tkl.f32]:
280280

281281
# CHECK-LABEL: test_reordered_gemm
282282
# CHECK-DAG: #[[MAP_LIN_A:.+]] = affine_map<()[s0, s1, s2, s3, s4] -> (s0 * 65536 + s2 * 16384 + s3 * 8 + s4 * 32 + (s1 floordiv 4) * 32768 + (s3 floordiv 4) * 480 - ((s2 * 32 + s3 floordiv 4) floordiv 64) * 32768 - ((s0 * 8 + s1) floordiv 32) * 262144)>
283-
# CHECK-DAG: #[[MAP_LIN_B:.+]] = affine_map<()[s0, s1, s2, s3, s4] -> (s0 * 32768 + s2 * 16384 + s3 * 8 + s4 * 32 + ((s0 + s1 * 8) floordiv 32) * 131072 + (s3 floordiv 4) * 480 - ((s2 * 32 + s3 floordiv 4) floordiv 64) * 32768 - (s0 floordiv 4) * 131072)>
283+
# CHECK-DAG: #[[MAP_LIN_B:.+]] = affine_map<()[s0, s1, s2, s3, s4] -> (s0 * 32768 + s2 * 16384 + s3 * 8 + s4 * 32 + ((s0 + s1 * 8) floordiv 32) * 131072 - (s0 floordiv 4) * 131072 + (s3 floordiv 4) * 480 - ((s2 * 32 + s3 floordiv 4) floordiv 64) * 32768)>
284284
# CHECK-DAG: affine.apply #[[MAP_LIN_A]]()[%block_id_y, %block_id_x, %thread_id_y, %thread_id_x, {{.*}}]
285285
# CHECK-DAG: affine.apply #[[MAP_LIN_B]]()[%block_id_x, %block_id_y, %thread_id_y, %thread_id_x, {{.*}}]
286286
# CHECK-DAG: vector.load {{.*}} : memref<{{.*}}xf16, strided<[1]>>, vector<8xf16>

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ dependencies = [
3737
"sympy",
3838
"torch>=2.6,<2.10",
3939
"typing_extensions",
40-
"ixsimpl @ git+https://github.com/hardcode84/4.git@d41a6255b62eb5b9192a2fecee0ef0330ce59f69",
4140
]
4241

4342
dynamic = ["version"]

0 commit comments

Comments
 (0)