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

[TIR] Enhance VerifyGPUCode #6194

Merged
merged 1 commit into from
Aug 3, 2020

Conversation

merrymercy
Copy link
Member

@merrymercy merrymercy commented Aug 3, 2020

  • Improve vectorization check in VerifyGPUCode
  • Add maximum length check for vthread in VerifyGPUCode

cc @jcf94 @FrozenGene @csullivan @Laurawly

@@ -134,25 +138,28 @@ class GPUCodeVerifier : public StmtExprVisitor {
}
}

void VisitStmt_(const ForNode* op) {
if (op->loop_var->name_hint == "vthread.s") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since there's a check in AttrStmtNode, is it necessary to further check ForNode?

Copy link
Member Author

Choose a reason for hiding this comment

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

@jcf94 It is necessary. The pragma will be translated to a for loop in the InjectiveVirturalThread pass. Adding this check makes the verification work both before and after InjectVirtualThread pass.

@merrymercy merrymercy merged commit 21e895c into apache:master Aug 3, 2020
@merrymercy merrymercy deleted the pr-enhance-verify-gpu-code branch August 3, 2020 20:23
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Sep 2, 2020
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 3, 2020
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.

3 participants