-
Notifications
You must be signed in to change notification settings - Fork 87
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
Modify reshapes #2099
Merged
Merged
Modify reshapes #2099
Conversation
This file contains 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
Just make the old reshape into reshape_lazy since this is going to be performing aliasing after we perform a proper pass of reshapes.
Case here is to let reshape fall into a contiguous to do the copy required for nonstandard shape->standard shape convert.
this will get filtered out once proper order and aliasing is determined
use this to find a reshape->contiguous and then determine if aliasing can be done thus use the proper reshape or reshape lazy operator
These will get cleaned up later but result in us adding contiguous after every reshape prior to us performing a find_reshape_alias matcher
Unable to get dims() to populate correclty. fails at replace_instruction in lowering
Don't need this anymore
Not needed so we don;'t need the extra contiguous as we're trying to eliminate the need to use contiguous
Make reshape work like contiguous to perform the copy and then add proper aliasing in lowering if we're unable to perform a replace instruction
Not needed anymore as reshape performs the copy by default instead thus contiguous is not needed
Reuse the previous test for reshape lazy since we've made reshape -> reshape_lazy
Move reshape to reshape_lazy which performs the aliasing for op_shape_test
TedThemistokleous
added
enhancement
New feature or request
roadmap
Tasks to finish for a release
TorchMIGraphX
labels
Aug 18, 2023
This was
linked to
issues
Aug 18, 2023
This build is not recommended to merge 🔴 |
🔴torchvision-inceptionv3_1: FAILED: MIGraphX is not within tolerance - check verbose output🔴cadene-dpn92_1: FAILED: MIGraphX is not within tolerance - check verbose output🔴slim-inceptionv4_1: FAILED: MIGraphX is not within tolerance - check verbose output🔴bert_base_cased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output🔴bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output🔴distilgpt2_fp16: FAILED: MIGraphX is not within tolerance - check verbose output |
-Split reshape_shape into rehshape_shape_invalid, reshape_shape_minus1_reshapes -Added back assertions to handle each possible case
umangyadav
reviewed
Sep 20, 2023
umangyadav
reviewed
Sep 20, 2023
umangyadav
reviewed
Sep 20, 2023
Similar to the reshape_lazy_dims version of this call but we don't need to care for strides merging/aliasing as the copy operations around the reshape will afford us the ability to change memory layout to perform the correct reshape operation
Since we aren't worried about aliasing anymore for squeeze/unsqueeze cases we can rename the test to handle mem layout changes. Test is renamed to reflect that. In the reshape_lazy case which aliases, this case is actually an error.
In the case of reshape we can modify the output memory layout via copy thus the output size can be larger than that of the input.
pfultz2
approved these changes
Sep 22, 2023
umangyadav
reviewed
Sep 22, 2023
umangyadav
reviewed
Sep 22, 2023
…e_test Change to a different shape in this test
TedThemistokleous
force-pushed
the
modify_reshapes_develop
branch
from
September 22, 2023 19:05
c60cb61
to
df9b7c0
Compare
CharlieL7
approved these changes
Sep 27, 2023
This was referenced Oct 11, 2023
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Modify reshapes to use reshape_lazy for aliasing and then reshape for a reshape copy operation to eliminate contiguous
Used to get pass reshape errors seen when running TIMMs models for TorchMIGraphX