MCPcopy Create free account
hub / github.com/tile-ai/tilelang / get_wrong_kernel

Function get_wrong_kernel

testing/python/issue/test_tilelang_issue_1374.py:8–23  ·  view source on GitHub ↗
(M: int = 4096)

Source from the content-addressed store, hash-verified

6def test_issue_1374_non_var_itermark():
7 @tl.jit
8 def get_wrong_kernel(M: int = 4096):
9 dtype = "int32"
10 num_threads = 128
11
12 @T.prim_func
13 def main(A: T.Tensor((16, 14), dtype=dtype), B: T.Tensor((16, 448), dtype=dtype)):
14 with T.Kernel(1, threads=num_threads) as (bx,):
15 A_local = T.alloc_fragment((16, 14), dtype=dtype)
16 B_local = T.alloc_fragment((16, 448), dtype=dtype)
17
18 T.copy(A, A_local)
19 T.copy(B, B_local)
20 for i, j in T.Parallel(16, 448):
21 B[i, j] += A_local[i, j // 32]
22
23 return main
24
25 kernel = get_wrong_kernel()
26 print(kernel.get_kernel_source())

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…