Skip to content
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

[IR] Fix continue statement in struct for and add a related test #3282

Merged
merged 15 commits into from
Nov 6, 2021

Conversation

BillXu2000
Copy link
Collaborator

@BillXu2000 BillXu2000 commented Oct 26, 2021

fixes #3272

It seems that only a few backends (including llvm, metal) support struct-for, and I only fix this problem for llvm CUDA and cpu backends.
Not sure whether this works for metal.

@netlify
Copy link

netlify bot commented Oct 26, 2021

❌ Deploy Preview for jovial-fermat-aa59dc failed.

🔨 Explore the source changes: dde1089

🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/6185211e6650270008f6f515

@BillXu2000 BillXu2000 requested a review from k-ye October 26, 2021 06:21
@yuanming-hu
Copy link
Member

/format

@k-ye k-ye requested a review from g1n0st October 26, 2021 07:02
Copy link
Contributor

@g1n0st g1n0st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

taichi/ir/statements.cpp Outdated Show resolved Hide resolved
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the original behavior for the Metal backend -- Metal has to translate parallelized continue to return.

@g1n0st g1n0st self-requested a review October 27, 2021 02:45
@BillXu2000 BillXu2000 requested a review from k-ye October 27, 2021 04:09
@BillXu2000
Copy link
Collaborator Author

/format

@g1n0st
Copy link
Contributor

g1n0st commented Oct 27, 2021

@k-ye

@BillXu2000
Copy link
Collaborator Author

/format

@g1n0st g1n0st requested a review from k-ye October 31, 2021 05:23
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

taichi/backends/metal/codegen_metal.cpp Outdated Show resolved Hide resolved
taichi/backends/vulkan/codegen_vulkan.cpp Outdated Show resolved Hide resolved
taichi/codegen/codegen_llvm.cpp Outdated Show resolved Hide resolved
@g1n0st g1n0st self-assigned this Nov 5, 2021
@g1n0st g1n0st merged commit d4af2f8 into taichi-dev:master Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[IR] Continue statement behavior is confusing in struct for
5 participants