(M, N)
| 3 | |
| 4 | |
| 5 | def _test_kernel(M, N): |
| 6 | dtype = "bfloat16" |
| 7 | |
| 8 | @T.prim_func |
| 9 | def fwd_main( |
| 10 | KV: T.Tensor((M, N), dtype), |
| 11 | ids: T.Tensor((4,), "int32"), |
| 12 | ids2: T.Tensor((4,), "int32"), |
| 13 | ): |
| 14 | with T.Kernel(4, threads=1): |
| 15 | A = T.alloc_shared([N], dtype) |
| 16 | B = T.alloc_shared([N], dtype) |
| 17 | |
| 18 | for i in T.Pipelined(4, num_stages=1): |
| 19 | id = ids[i] |
| 20 | id2 = ids2[id] |
| 21 | T.copy(KV[id2, :], A) |
| 22 | T.clear(B) |
| 23 | |
| 24 | return fwd_main |
| 25 | |
| 26 | |
| 27 | def _test_kernel_if_cond(M, N): |
no outgoing calls
no test coverage detected
searching dependent graphs…