-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[opt] Avoid storing constants across offloaded tasks #812
Conversation
BTW, I wonder if |
05ca2e5
to
7d3bd6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you and LGTM! Sorry about the force-pushes... (Let me know if I screw up anything.)
I assuming you are talking about import taichi as ti
ti.init()
@ti.kernel
def f():
a = 1
b = 0
for i in range(10):
b += a
print(b)
f() and it indeed crashes ...
If you already have an idea to fix this, could you open another PR for this one? I'll just merge this in after CI passes. |
Thanks for providing an example and I'll open another PR to fix it. |
Related issue = #656 #729
Test case:
test_local_atomics.py::test_implicit_local_atomic_or
before:
after:
[Click here for the format server]