We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug The loop inside a if statement is identified as an outermost loop, which is incompatible with the current doc.
According to the current doc, it is the loop at the outermost scope that gets parallelized, not the outermost loop. https://docs.taichi.graphics/#parallel-for-loops
To Reproduce
import taichi as ti ti.init() x = ti.field(dtype=int, shape=()) x[None] = 1 @ti.kernel def test_break(): if x[None] > 0: for i in range(5): x[None] += 1 break test_break()
import taichi as ti ti.init() @ti.kernel def test_break_2(x:int): if x > 0: for i in range(5): x = 1 break test_break_2(2)
Log/Screenshots
The text was updated successfully, but these errors were encountered:
I've spotted it in #4238. I will take a look at the code and determine whether we change the code or the documentation.
Sorry, something went wrong.
Did we change the doc or had a fix already? can we close this issue?
The outermost loop which is not in the outermost scope is not parallelized. We should change the code to allow break in these loops.
break
Successfully merging a pull request may close this issue.
Describe the bug
The loop inside a if statement is identified as an outermost loop, which is incompatible with the current doc.
According to the current doc, it is the loop at the outermost scope that gets parallelized, not the outermost loop.
https://docs.taichi.graphics/#parallel-for-loops
To Reproduce
Log/Screenshots
The text was updated successfully, but these errors were encountered: