Open hecmay opened 2 years ago
vector-add example to map loops after hcl.split
to specific thread and block axes
def kernel(A, B):
C = hcl.compute((256,), lambda i: A[i] + B[i], "C")
return C
bx, tx = s[kernel.C].split(kernel.C.axis[0], factor=64)
s[kernel.C].bind(bx, hcl.BlockIdx.x)
s[kernel.C].bind(tx, hcl.ThreadIdx.x)
TBA