-
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
[TE] Add LegalizeInvalidAttach to legalize the compute_at location after split or fuse #5917
[TE] Add LegalizeInvalidAttach to legalize the compute_at location after split or fuse #5917
Conversation
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.
Overall LGTM in terms of the functionality.
cc @vinx13 @Hzfengsy @spectrometerHBH please also help to take a look, we can proceed to merge after reviews by a few more eyes |
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.
LGTM
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.
Otherwise LGTM
@@ -196,6 +196,7 @@ tvm_t.* | |||
.python_history | |||
.pytest_cache | |||
.local | |||
cmake-build-debug |
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.
Maybe we don’t need this line
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.
It is produced by my Jetbrain Clion
…ter split or fuse (apache#5917) * Add LegalizeInvalidAttach * lint & typo * lint & typo * address comment * fix lint
…ter split or fuse (apache#5917) * Add LegalizeInvalidAttach * lint & typo * lint & typo * address comment * fix lint
Add
LegalizeInvalidAttach
inSchedule::normalize
to legalize the compute_at location if the target iterator of compute_at is split or fused.Case 2 can only happen if the target of compute_at is the innermost operand of fuse operation.
Examples: the following two cases will crash the compiler before this fix, but they are legal after this fix.