[fx] Don't use generators in map_aggregate#135082
Closed
jansel wants to merge 5 commits intogh/jansel/383/basefrom
Closed
[fx] Don't use generators in map_aggregate#135082jansel wants to merge 5 commits intogh/jansel/383/basefrom
jansel wants to merge 5 commits intogh/jansel/383/basefrom
Conversation
This was referenced Sep 4, 2024
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/135082
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit a835f86 with merge base 58f2477 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
oulgen
approved these changes
Sep 4, 2024
This was referenced Sep 5, 2024
pytorchmergebot
pushed a commit
that referenced
this pull request
Sep 5, 2024
Pull Request resolved: #135084 Approved by: https://github.com/oulgen ghstack dependencies: #135070, #135076, #135082
pytorchmergebot
pushed a commit
that referenced
this pull request
Sep 6, 2024
Before:  After:  Pull Request resolved: #135079 Approved by: https://github.com/oulgen ghstack dependencies: #135070, #135076, #135082, #135084
pytorchmergebot
pushed a commit
that referenced
this pull request
Sep 6, 2024
This is roughly a 7% speedup in inductor compile time for hf_Bert_large. The time spent in `LoopBody.__init__` improves from 15% to 8% of `fx_codegen_and_compile`. Before  After  Overall  Pull Request resolved: #135235 Approved by: https://github.com/oulgen ghstack dependencies: #135070, #135076, #135082, #135084, #135079
pytorchmergebot
pushed a commit
that referenced
this pull request
Sep 6, 2024
Chao1Han
pushed a commit
to Chao1Han/pytorch
that referenced
this pull request
Sep 20, 2024
While the generators avoid a copy, they are slow. Before:  After:  Pull Request resolved: pytorch#135082 Approved by: https://github.com/oulgen ghstack dependencies: pytorch#135070, pytorch#135076
Chao1Han
pushed a commit
to Chao1Han/pytorch
that referenced
this pull request
Sep 20, 2024
Pull Request resolved: pytorch#135084 Approved by: https://github.com/oulgen ghstack dependencies: pytorch#135070, pytorch#135076, pytorch#135082
Chao1Han
pushed a commit
to Chao1Han/pytorch
that referenced
this pull request
Sep 20, 2024
Before:  After:  Pull Request resolved: pytorch#135079 Approved by: https://github.com/oulgen ghstack dependencies: pytorch#135070, pytorch#135076, pytorch#135082, pytorch#135084
Chao1Han
pushed a commit
to Chao1Han/pytorch
that referenced
this pull request
Sep 20, 2024
This is roughly a 7% speedup in inductor compile time for hf_Bert_large. The time spent in `LoopBody.__init__` improves from 15% to 8% of `fx_codegen_and_compile`. Before  After  Overall  Pull Request resolved: pytorch#135235 Approved by: https://github.com/oulgen ghstack dependencies: pytorch#135070, pytorch#135076, pytorch#135082, pytorch#135084, pytorch#135079
Chao1Han
pushed a commit
to Chao1Han/pytorch
that referenced
this pull request
Sep 20, 2024
Pull Request resolved: pytorch#135256 Approved by: https://github.com/oulgen ghstack dependencies: pytorch#135070, pytorch#135076, pytorch#135082, pytorch#135084, pytorch#135079, pytorch#135235
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 (oldest at bottom):
While the generators avoid a copy, they are slow.
Before:

After:
