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

Function get_wrong_kernel

testing/python/issue/test_tilelang_issue_1549.py:10–25  ·  view source on GitHub ↗
(M: int = 4096)

Source from the content-addressed store, hash-verified

8def test_issue_1549_strange_var_vectorization():
9 @tl.jit
10 def get_wrong_kernel(M: int = 4096):
11 dtype = "int32"
12 num_threads = 64
13
14 @T.prim_func
15 def main(
16 Data: T.Tensor((M,), dtype),
17 ):
18 with T.Kernel(1, threads=num_threads) as _:
19 # Pre-allocated scalar variables (causes issue in 0.1.7.post1)
20 idx = T.alloc_var(T.int32)
21 for i in T.Parallel(M):
22 idx = i
23 Data[i] = idx
24
25 return main
26
27 kernel = get_wrong_kernel()
28 M = 2048

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…