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

Function alloc_var

testing/python/language/test_tilelang_language_alloc.py:6–23  ·  view source on GitHub ↗
(
    N,
    block_N,
    dtype,
)

Source from the content-addressed store, hash-verified

4
5
6def alloc_var(
7 N,
8 block_N,
9 dtype,
10):
11 @T.prim_func
12 def main(
13 A: T.Tensor((N,), dtype),
14 B: T.Tensor((N,), dtype),
15 ):
16 with T.Kernel(T.ceildiv(N, block_N), threads=block_N) as bx:
17 A_shared = T.alloc_shared([block_N], dtype)
18 tmp = T.alloc_var(dtype)
19 tmp = 1 # noqa: F841
20 T.copy(A[bx * block_N], A_shared)
21 T.copy(A_shared, B[bx * block_N])
22
23 return main
24
25
26def run_alloc_var(

Callers 1

run_alloc_varFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…