-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[TIR] Enhance VerifyGPUCode #6194
Conversation
@@ -134,25 +138,28 @@ class GPUCodeVerifier : public StmtExprVisitor { | |||
} | |||
} | |||
|
|||
void VisitStmt_(const ForNode* op) { | |||
if (op->loop_var->name_hint == "vthread.s") { |
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.
Since there's a check in AttrStmtNode
, is it necessary to further check ForNode
?
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.
@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.
cc @jcf94 @FrozenGene @csullivan @Laurawly