Hi, I have a question about difftaichi data access rule from Differentiable Programming | Taichi Docs
In the difftaichi example code mass_spring.py, I found that in the kernel function:
@ti.kernel
def nn2(t: ti.i32):
for i in range(n_springs):
actuation = 0.0
for j in ti.static(range(n_hidden)):
actuation += weights2[i, j] * hidden[t, j]
actuation += bias2[i]
actuation = ti.tanh(actuation)
act[t, i] = actuation
It seems the variable actuation violates the rule 2? actuation = ti.tanh(actuation) is not a atomic operation? Could anyone help me to explain this please. Thanks
Kind Regards,
Jianhui