You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using an atomic add on a SharedArray vector causes the assertion below.
(May be related to #8435?)
> python bad_shared.py
[Taichi] version 1.7.0, llvm 15.0.4, commit 6a30b8dc, linux, python 3.10.11
[Taichi] Starting on arch=cuda
python: /home/ailzhang/github/llvm-project/llvm/lib/IR/Instructions.cpp:1647: void llvm::AtomicRMWInst::Init(llvm::AtomicRMWInst::BinOp, llvm::Value *, llvm::Value *, llvm::Align, llvm::AtomicOrdering, SyncScope::ID): Assertion `cast<PointerType>(getOperand(0)->getType()) ->isOpaqueOrPointeeTypeMatches(getOperand(1)->getType()) && "Ptr must be a pointer to Val type!"' failed.
[1] 28401 IOT instruction (core dumped) python bad_shared.py
import taichi as ti
@ti.kernel
def foo():
ti.loop_config(block_dim=64)
for x in range(1000):
shared = ti.simt.block.SharedArray((64, ), dtype=ti.math.vec3)
shared[x % 64] = ti.math.vec3(0)
ti.simt.block.sync()
for i in range(64):
ti.atomic_add(shared[i], ti.math.vec3(1))
ti.init(arch=ti.cuda)
foo()
The text was updated successfully, but these errors were encountered:
Using an atomic add on a SharedArray vector causes the assertion below.
(May be related to #8435?)
The text was updated successfully, but these errors were encountered: