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

Function set_cache_kernel

testing/python/issue/test_tilelang_issue_1115.py:8–30  ·  view source on GitHub ↗
(
        S,
        D,
        pos_ty="int64",
        dtype=T.float32,
    )

Source from the content-addressed store, hash-verified

6def test_int64_address():
7 @tilelang.jit
8 def set_cache_kernel(
9 S,
10 D,
11 pos_ty="int64",
12 dtype=T.float32,
13 ):
14 @T.prim_func
15 def main(
16 pos: T.Tensor(
17 [
18 S,
19 ],
20 pos_ty,
21 ), # type: ignore `TypeError: Check failed: (a.dtype() == b.dtype()) is false: mismatched types. int64 vs. int32`
22 value: T.Tensor([S, D], dtype), # type: ignore
23 cache: T.Tensor([S, D], dtype), # type: ignore
24 ):
25 with T.Kernel(S, threads=128) as bx:
26 slot = pos[bx]
27 for i in T.Parallel(D):
28 cache[slot, i] = value[bx, i]
29
30 return main
31
32 D = 2
33 S = 10

Callers 1

test_int64_addressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…