Passing argument into taichi’s kernel yields strange error logs as follows:
Attribute dim not found.
The MRE is as follows:
import taichi as ti
ti.init(arch=ti.gpu)
a = ti.var(dt=ti.f32, shape=(10, 10, 10))
@ti.kernel
def fill_3d(x: ti.f32):
# Parallelized for all 3 <= i < 8, 1 <= j < 6, 0 <= k < 9
for i, j, k in ti.ndrange((3, 8), (1, 6), 9):
x[i, j, k] = i + j + k
fill_3d(a)