Skip resize_output call when TensorIterator has proven it's unnecessary#50958
Closed
ezyang wants to merge 2 commits intogh/ezyang/902/basefrom
Closed
Skip resize_output call when TensorIterator has proven it's unnecessary#50958ezyang wants to merge 2 commits intogh/ezyang/902/basefrom
ezyang wants to merge 2 commits intogh/ezyang/902/basefrom
Conversation
Previously, we unconditionally called resize_output, even when it was known (via the op.will_resize boolean) that you have exactly the right size already. Thanks to Natalia Gimelshein for diagnosing the problem and Scott Wolchok for convincing me to fix it this way (as opposed to speeding up resize_output). Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
Contributor
💊 CI failures summary and remediationsAs of commit 7eb65a7 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
…s unnecessary" Previously, we unconditionally called resize_output, even when it was known (via the op.will_resize boolean) that you have exactly the right size already. Thanks to Natalia Gimelshein for diagnosing the problem and Scott Wolchok for convincing me to fix it this way (as opposed to speeding up resize_output). Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
ezyang
added a commit
that referenced
this pull request
Jan 22, 2021
Previously, we unconditionally called resize_output, even when it was known (via the op.will_resize boolean) that you have exactly the right size already. Thanks to Natalia Gimelshein for diagnosing the problem and Scott Wolchok for convincing me to fix it this way (as opposed to speeding up resize_output). Signed-off-by: Edward Z. Yang <ezyang@fb.com> ghstack-source-id: 5f9089d Pull Request resolved: #50958
Contributor
Author
|
This didn't improve benchmarks as much as I was hoping. Benchmarks: Control test (no change expected): Before: 825172 Example from benchmark suite (expected to improve) Before: 1735152 |
Collaborator
|
I guess it's a problem specifically on the thing Bert was benchmarking, |
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.
Stack from ghstack:
Previously, we unconditionally called resize_output, even when it was
known (via the op.will_resize boolean) that you have exactly the right
size already. Thanks to Natalia Gimelshein for diagnosing the problem
and Scott Wolchok for convincing me to fix it this way (as opposed
to speeding up resize_output).
Signed-off-by: Edward Z. Yang ezyang@fb.com