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

Function get_kernel

testing/python/issue/test_tilelang_issue_1257.py:19–31  ·  view source on GitHub ↗
(m: int)

Source from the content-addressed store, hash-verified

17
18 @tilelang.jit
19 def get_kernel(m: int):
20 @T.prim_func
21 def test_kernel(
22 a: T.Tensor[(m,), "int32"],
23 ):
24 with T.Kernel(1, threads=1024) as (bx):
25 shared = T.alloc_shared((1024,), "int32")
26 tx = T.get_thread_binding(0)
27 shared[tx ^ 1] = 0
28 T.atomic_add(shared[tx], 1)
29 a[tx] = shared[tx ^ 32]
30
31 return test_kernel
32
33 kernel = get_kernel(m)
34 source = kernel.get_kernel_source()

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…