-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[funcol] a few optimizations to funcol #113324
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
Conversation
Apply a few optimizations to funcol: - allgather on non-0 dim, the resulting tensor already needs to access data in order to do torch.cat, so we sync wait here so that we don;t need to go through ACT dispatch for chunk + cat alltogether - have a fast return logic to aten.view as it's a commonly hit op for view related ops [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/113324
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (3 Unrelated Failures)As of commit 2de50e9 with merge base 7843df6 ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Apply a few optimizations to funcol: - allgather on non-0 dim, the resulting tensor already needs to access data in order to do torch.cat, so we sync wait here so that we don;t need to go through ACT dispatch for chunk + cat alltogether - have a fast return logic to aten.view as it's a commonly hit op for view related ops [ghstack-poisoned]
Apply a few optimizations to funcol: - allgather on non-0 dim, the resulting tensor already needs to access data in order to do torch.cat, so we sync wait here so that we don;t need to go through ACT dispatch for chunk + cat alltogether - have a fast return logic to aten.view as it's a commonly hit op for view related ops ghstack-source-id: 1d5a0cb Pull Request resolved: #113324
Apply a few optimizations to funcol: - allgather on non-0 dim, the resulting tensor already needs to access data in order to do torch.cat, so we sync wait here so that we don;t need to go through ACT dispatch for chunk + cat alltogether - have a fast return logic to aten.view as it's a commonly hit op for view related ops [ghstack-poisoned]
Apply a few optimizations to funcol: - allgather on non-0 dim, the resulting tensor already needs to access data in order to do torch.cat, so we sync wait here so that we don;t need to go through ACT dispatch for chunk + cat alltogether - have a fast return logic to aten.view as it's a commonly hit op for view related ops cc H-Huang awgu kwen2501 fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu [ghstack-poisoned]
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.
I think this PR is ready to merge?
Apply a few optimizations to funcol: - allgather on non-0 dim, the resulting tensor already needs to access data in order to do torch.cat, so we sync wait here so that we don;t need to go through ACT dispatch for chunk + cat alltogether - have a fast return logic to aten.view as it's a commonly hit op for view related ops cc H-Huang awgu kwen2501 fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu [ghstack-poisoned]
|
|
||
| @classmethod | ||
| def __torch_dispatch__(cls, func, types, args=(), kwargs=None): | ||
| if func == torch.ops.aten.view.default: |
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.
I am ok with perf improvement change, but would this make the code look hacky?
|
Adding |
Apply a few optimizations to funcol: - allgather on non-0 dim, the resulting tensor already needs to access data in order to do torch.cat, so we sync wait here so that we don;t need to go through ACT dispatch for chunk + cat alltogether - have a fast return logic to aten.view as it's a commonly hit op for view related ops cc H-Huang awgu kwen2501 fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu [ghstack-poisoned]
Apply a few optimizations to funcol: - allgather on non-0 dim, the resulting tensor already needs to access data in order to do torch.cat, so we sync wait here so that we don;t need to go through ACT dispatch for chunk + cat alltogether - have a fast return logic to aten.view as it's a commonly hit op for view related ops ghstack-source-id: 921e657 Pull Request resolved: #113324
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Apply a few optimizations to funcol: - allgather on non-0 dim, the resulting tensor already needs to access data in order to do torch.cat, so we sync wait here so that we don;t need to go through ACT dispatch for chunk + cat alltogether - have a fast return logic to aten.view as it's a commonly hit op for view related ops cc H-Huang awgu kwen2501 fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu tianyu-l [ghstack-poisoned]
|
Successfully rebased |
Apply a few optimizations to funcol: - allgather on non-0 dim, the resulting tensor already needs to access data in order to do torch.cat, so we sync wait here so that we don;t need to go through ACT dispatch for chunk + cat alltogether - have a fast return logic to aten.view as it's a commonly hit op for view related ops ghstack-source-id: addcea0 Pull Request resolved: #113324
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 2 jobs have failed, first few of them are: .github/workflows/trunk.yml / win-vs2019-cpu-py3 / test (default, 1, 3, windows.4xlarge.nonephemeral), .github/workflows/trunk.yml / win-vs2019-cpu-py3 / test (default, 2, 3, windows.4xlarge.nonephemeral) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -i "windows failures not related" |
|
❌ 🤖 pytorchbot command failed: Try |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 3 checks: periodic / win-vs2019-cuda11.8-py3 / build, .github/workflows/trunk.yml / win-vs2019-cpu-py3 / test (default, 1, 3, windows.4xlarge.nonephemeral), .github/workflows/trunk.yml / win-vs2019-cpu-py3 / test (default, 2, 3, windows.4xlarge.nonephemeral) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Apply a few optimizations to funcol: - allgather on non-0 dim, the resulting tensor already needs to access data in order to do torch.cat, so we sync wait here so that we don;t need to go through ACT dispatch for chunk + cat alltogether - have a fast return logic to aten.view as it's a commonly hit op for view related ops Pull Request resolved: pytorch#113324 Approved by: https://github.com/XilunWu
Stack from ghstack (oldest at bottom):
Apply a few optimizations to funcol:
data in order to do torch.cat, so we sync wait here so that we don;t
need to go through ACT dispatch for chunk + cat alltogether
view related ops
cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @fduwjj @wz337 @tianyu-l @wconstab @yf225 @kiukchung @LucasLLC @d4l3k