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

[Bug] [ir] Fix the IdentifyValuesUsedInOtherOffloads pass #3597

Merged
merged 1 commit into from Nov 23, 2021

Conversation

strongoier
Copy link
Contributor

@strongoier strongoier commented Nov 23, 2021

Related issue = #3463, #3467

#3467 didn't point out the accurate root cause of #3463. RangeForStmt was indeed visited with

void BasicStmtVisitor::visit(RangeForStmt *for_stmt) {
preprocess_container_stmt(for_stmt);
for_stmt->body->accept(this);
}
instead of
void visit(Stmt *stmt) override {
int n_op = stmt->num_operands();
for (int i = 0; i < n_op; i++) {
auto op = stmt->operand(i);
test_and_allocate(op);
}
}

Having this, the most effective way to fix #3467 is to fill in the preprocess_container_stmt() member function common to all container statements, which is done in this PR.

@netlify
Copy link

netlify bot commented Nov 23, 2021

✔️ Deploy Preview for jovial-fermat-aa59dc canceled.

🔨 Explore the source changes: 8b62797

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

Copy link
Collaborator

@lin-hitonami lin-hitonami left a comment

Choose a reason for hiding this comment

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

LGTM!

@strongoier strongoier merged commit 26b833e into taichi-dev:master Nov 23, 2021
@strongoier strongoier deleted the fix-3467 branch November 23, 2021 09:49
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.

Finish the implementation of IdentifyValuesUsedInOtherOffloads
2 participants