Merged
Conversation
Contributor
Author
- 1208 0.005 0.000 0.005 0.000 {method 'reshape' of 'torch._C._TensorBase' objects}
- 10135 0.025 0.000 0.031 0.000 {method 'view' of 'torch._C._TensorBase' objects}
+ 6725 0.023 0.000 0.031 0.000 {method 'reshape' of 'torch._C._TensorBase' objects}
+ 4618 0.010 0.000 0.010 0.000 {method 'view' of 'torch._C._TensorBase' objects}I think we are good. Even if the difference is not measuring tolerance, we are talking about |
datumbox
approved these changes
Oct 15, 2022
facebook-github-bot
pushed a commit
that referenced
this pull request
Oct 17, 2022
Reviewed By: NicolasHug Differential Revision: D40427450 fbshipit-source-id: ae8363119a5fde381c19b442818e238d0818c4c5
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
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.
As suggested in #6775 (comment), this PR replaces all
.view(...)calls with.reshape(...). In the regular case, they do the same thing, but in case.view()would fail because the input is noncontiguous,.reshapefixes this and afterwards performs the specified operation.Having this earlier would have prevented #6772 and #6775.