-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[MPS] Fix upsample for NHWC output #94963
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/94963
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 20bab8b: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
LGTM
@pytorchbot rebase |
@pytorchbot successfully started a rebase job. Check the current status here |
* Fix upsample for NHWC output * Add testcase
Successfully rebased |
5622507
to
20bab8b
Compare
@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 |
@pytorchbot merge -f "Lint+MPS is green" |
The merge job was canceled. If you believe this is a mistake,then you can re trigger it through pytorch-bot. |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Fixes huggingface/diffusers#941 **Before**: <img width="1144" alt="Screenshot 2023-02-15 at 8 11 53 PM" src="https://user-images.githubusercontent.com/104024078/219266709-6a77636a-2fc0-4802-b130-85069b95953f.png"> **After**: <img width="1144" alt="Screenshot 2023-02-15 at 8 12 02 PM" src="https://user-images.githubusercontent.com/104024078/219266694-ea743c02-fb55-44f1-b7d6-5946106527c3.png"> Pull Request resolved: pytorch#94963 Approved by: https://github.com/razarmehr
* [MPS] Fix upsample for NHWC output (#94963) Fixes huggingface/diffusers#941 **Before**: <img width="1144" alt="Screenshot 2023-02-15 at 8 11 53 PM" src="https://user-images.githubusercontent.com/104024078/219266709-6a77636a-2fc0-4802-b130-85069b95953f.png"> **After**: <img width="1144" alt="Screenshot 2023-02-15 at 8 12 02 PM" src="https://user-images.githubusercontent.com/104024078/219266694-ea743c02-fb55-44f1-b7d6-5946106527c3.png"> Pull Request resolved: #94963 Approved by: https://github.com/razarmehr * [MPS] Move max_pool2d to mps dispatch key (#90772) Related issue: #77394 This PR also modifies some assertions in the codegen, an explanatory comment for it has been added. Pull Request resolved: #90772 Approved by: https://github.com/albanD * [MPS] Convert output back to ChannelsLast for MaxPool2D (#94877) Since we re-stride the indices and output in MPS pooling from ChannelsLast to Contiguous, we need to convert the results back to ChannelsLast. This will fix the failure with test_memory_format with MaxPool2D in test_modules.py. Pull Request resolved: #94877 Approved by: https://github.com/kulinseth, https://github.com/DenisVieriu97 --------- Co-authored-by: Denis Vieriu <104024078+DenisVieriu97@users.noreply.github.com> Co-authored-by: Li-Huai (Allan) Lin <qqaatw@gmail.com> Co-authored-by: Ramin Azarmehr <razarmehr@apple.com>
This reverts commit a2afc65.
* [MPS] Fix upsample for NHWC output (pytorch#94963) Fixes huggingface/diffusers#941 **Before**: <img width="1144" alt="Screenshot 2023-02-15 at 8 11 53 PM" src="https://user-images.githubusercontent.com/104024078/219266709-6a77636a-2fc0-4802-b130-85069b95953f.png"> **After**: <img width="1144" alt="Screenshot 2023-02-15 at 8 12 02 PM" src="https://user-images.githubusercontent.com/104024078/219266694-ea743c02-fb55-44f1-b7d6-5946106527c3.png"> Pull Request resolved: pytorch#94963 Approved by: https://github.com/razarmehr * [MPS] Move max_pool2d to mps dispatch key (pytorch#90772) Related issue: pytorch#77394 This PR also modifies some assertions in the codegen, an explanatory comment for it has been added. Pull Request resolved: pytorch#90772 Approved by: https://github.com/albanD * [MPS] Convert output back to ChannelsLast for MaxPool2D (pytorch#94877) Since we re-stride the indices and output in MPS pooling from ChannelsLast to Contiguous, we need to convert the results back to ChannelsLast. This will fix the failure with test_memory_format with MaxPool2D in test_modules.py. Pull Request resolved: pytorch#94877 Approved by: https://github.com/kulinseth, https://github.com/DenisVieriu97 --------- Co-authored-by: Denis Vieriu <104024078+DenisVieriu97@users.noreply.github.com> Co-authored-by: Li-Huai (Allan) Lin <qqaatw@gmail.com> Co-authored-by: Ramin Azarmehr <razarmehr@apple.com>
Fixes huggingface/diffusers#941
Before:
After: