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

Function debug_print_msg

testing/python/debug/test_tilelang_debug_print.py:98–113  ·  view source on GitHub ↗
(M=16, N=16, msg_only=False)

Source from the content-addressed store, hash-verified

96
97
98def debug_print_msg(M=16, N=16, msg_only=False):
99 dtype = T.float16
100
101 @T.prim_func
102 def program(Q: T.Tensor((M, N), dtype)):
103 with T.Kernel(4, 4, 2, threads=128 * 2) as (bx, by, bz):
104 tid = T.get_thread_binding()
105 if tid == 0:
106 if msg_only:
107 T.print(msg="hello world")
108 else:
109 T.print(bx + by + bz, msg="hello world")
110
111 jit_kernel = tilelang.compile(program)
112 profiler = jit_kernel.get_profiler()
113 profiler.run_once()
114
115
116def test_debug_print_msg():

Callers 1

test_debug_print_msgFunction · 0.85

Calls 3

get_profilerMethod · 0.80
compileMethod · 0.45
run_onceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…