(
N,
block_N,
dtype,
)
| 4 | |
| 5 | |
| 6 | def alloc_var( |
| 7 | N, |
| 8 | block_N, |
| 9 | dtype, |
| 10 | ): |
| 11 | @T.prim_func |
| 12 | def main( |
| 13 | A: T.Tensor((N,), dtype), |
| 14 | B: T.Tensor((N,), dtype), |
| 15 | ): |
| 16 | with T.Kernel(T.ceildiv(N, block_N), threads=block_N) as bx: |
| 17 | A_shared = T.alloc_shared([block_N], dtype) |
| 18 | tmp = T.alloc_var(dtype) |
| 19 | tmp = 1 # noqa: F841 |
| 20 | T.copy(A[bx * block_N], A_shared) |
| 21 | T.copy(A_shared, B[bx * block_N]) |
| 22 | |
| 23 | return main |
| 24 | |
| 25 | |
| 26 | def run_alloc_var( |
no outgoing calls
no test coverage detected
searching dependent graphs…