(M=16, N=16, msg_only=False)
| 96 | |
| 97 | |
| 98 | def 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 | |
| 116 | def test_debug_print_msg(): |
no test coverage detected
searching dependent graphs…