-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[TIR] Refactor IndexMap::Inverse in terms of NonSurjectiveInverse #12904
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The two implementations were largely identical, and had implementations that drifted apart, resulting in bugs such as apache#12852. This commit removes this duplication by writing `Inverse` in terms of `NonSurjectiveInverse`. The merged version of `NonSurjectiveInverse` contains bugfix apache#11841, that were previously present only in `Inverse`.
Member
vinx13
approved these changes
Sep 26, 2022
zxybazh
reviewed
Sep 26, 2022
Member
zxybazh
left a comment
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.
Hi Eric, thanks for fixing the issue! The PR looks good to me. Can you please also add a regression test?
Member
|
Oh ooops! Sorry I merged it in prematurely without a regression test...Feel free to add one as a follow-up! |
Lunderberg
added a commit
to Lunderberg/tvm
that referenced
this pull request
Sep 27, 2022
Adds a regression test for using the `layout_rewrite` post-proc on a buffer with an extent of one in at least one dimension, issue apache#12852. This bug was resolved as part of the refactor in apache#12904, but didn't have a regression test at that point.
Contributor
Author
|
No worries, regression test added in #12916. |
Lunderberg
added a commit
to Lunderberg/tvm
that referenced
this pull request
Sep 28, 2022
This is a fix for a bug introduced in apache#12904. Prior to then, an exception was raised when the transformation wouldn't be bijective over the transformed buffer's shape. The PR replaced the bijective check done as part of `DetectIterMap` with a check done on the returned `padding_predicate`. However, this check was not equivalent, and some transformations could erroneously apply, rather than raising an exception as being non-bijective. This commit re-enables the bijectivity check in `DetectIterMap`, and adds a test case for this behavior.
vinx13
pushed a commit
that referenced
this pull request
Sep 28, 2022
…12916) * [TIR][MetaSchedule] Add regression test for layout_rewrite extent=1 Adds a regression test for using the `layout_rewrite` post-proc on a buffer with an extent of one in at least one dimension, issue #12852. This bug was resolved as part of the refactor in #12904, but didn't have a regression test at that point. * Identified segfault and added test case
vinx13
pushed a commit
that referenced
this pull request
Oct 14, 2022
This is a fix for a bug introduced in #12904. Prior to then, an exception was raised when the transformation wouldn't be bijective over the transformed buffer's shape. The PR replaced the bijective check done as part of `DetectIterMap` with a check done on the returned `padding_predicate`. However, this check was not equivalent, and some transformations could erroneously apply, rather than raising an exception as being non-bijective. This commit re-enables the bijectivity check in `DetectIterMap`, and adds a test case for this behavior.
xinetzone
pushed a commit
to daobook/tvm
that referenced
this pull request
Nov 10, 2022
This is a fix for a bug introduced in apache#12904. Prior to then, an exception was raised when the transformation wouldn't be bijective over the transformed buffer's shape. The PR replaced the bijective check done as part of `DetectIterMap` with a check done on the returned `padding_predicate`. However, this check was not equivalent, and some transformations could erroneously apply, rather than raising an exception as being non-bijective. This commit re-enables the bijectivity check in `DetectIterMap`, and adds a test case for this behavior.
xinetzone
pushed a commit
to daobook/tvm
that referenced
this pull request
Nov 25, 2022
…ache#12904) The two implementations were largely identical, and had implementations that drifted apart, resulting in bugs such as apache#12852. This commit removes this duplication by writing `Inverse` in terms of `NonSurjectiveInverse`. The merged version of `NonSurjectiveInverse` contains bugfix apache#11841, that were previously present only in `Inverse`.
xinetzone
pushed a commit
to daobook/tvm
that referenced
this pull request
Nov 25, 2022
…pache#12916) * [TIR][MetaSchedule] Add regression test for layout_rewrite extent=1 Adds a regression test for using the `layout_rewrite` post-proc on a buffer with an extent of one in at least one dimension, issue apache#12852. This bug was resolved as part of the refactor in apache#12904, but didn't have a regression test at that point. * Identified segfault and added test case
xinetzone
pushed a commit
to daobook/tvm
that referenced
this pull request
Nov 25, 2022
This is a fix for a bug introduced in apache#12904. Prior to then, an exception was raised when the transformation wouldn't be bijective over the transformed buffer's shape. The PR replaced the bijective check done as part of `DetectIterMap` with a check done on the returned `padding_predicate`. However, this check was not equivalent, and some transformations could erroneously apply, rather than raising an exception as being non-bijective. This commit re-enables the bijectivity check in `DetectIterMap`, and adds a test case for this behavior.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The two implementations were largely identical, and had implementations that drifted apart, resulting in bugs such as #12852. This commit removes this duplication by writing
Inversein terms ofNonSurjectiveInverse. The merged version ofNonSurjectiveInversecontains bugfix #11841, that were previously present only inInverse.