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

Function func

testing/python/transform/test_tilelang_transform_thread_sync.py:30–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29 @T.prim_func(private=True)
30 def func():
31 A_shared = T.alloc_buffer((16, 128), dtype="float32", scope="shared")
32 bx = T.launch_thread("blockIdx.x", 1)
33 tx = T.launch_thread("threadIdx.x", 128)
34 ty = T.launch_thread("threadIdx.y", 1)
35 tz = T.launch_thread("threadIdx.z", 1)
36 for i in range(16):
37 T.evaluate(
38 T.call_intrin(
39 "float32",
40 tvm.tirx.op.Op.get("tl.atomic_add_elem_op"),
41 T.tvm_access_ptr(
42 T.type_annotation("float32"),
43 A_shared.data,
44 i * 128 + tx,
45 1,
46 3,
47 ),
48 T.float32(1),
49 T.int32(0),
50 )
51 )
52
53 mod = tvm.IRModule({"main": func})
54 mod = tilelang.transform.ThreadSync("shared")(mod)

Callers 1

reduce_funcFunction · 0.50

Calls 2

getMethod · 0.45
bindMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…