Skip to content

add Half/BFloat16 support for grid_sample on CPU - #134812

Closed
jiayisunx wants to merge 9 commits into
gh/jiayisunx/22/basefrom
gh/jiayisunx/22/head
Closed

jiayisunx wants to merge 9 commits into
gh/jiayisunx/22/basefrom
gh/jiayisunx/22/head

Conversation

@jiayisunx

@jiayisunx jiayisunx commented Aug 30, 2024 •

Copy link
Copy Markdown
Collaborator

[ghstack-poisoned]
@jiayisunx
jiayisunx requested a review from mruberry as a code owner August 30, 2024 01:59
@pytorch-bot

pytorch-bot Bot commented Aug 30, 2024 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/134812

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit a6c7721 with merge base 028c5d3 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added the module: cpu CPU specific problem (e.g., perf, algorithm) label Aug 30, 2024
jiayisunx added a commit that referenced this pull request Aug 30, 2024
ghstack-source-id: 24b7e03
Pull Request resolved: #134812
@jiayisunx
jiayisunx marked this pull request as draft August 30, 2024 02:00
[ghstack-poisoned]
@pytorch-bot pytorch-bot Bot added module: inductor release notes: onnx torch.onnx related changes that should show up in the release notes labels Sep 3, 2024
[ghstack-poisoned]
jiayisunx added a commit that referenced this pull request Sep 3, 2024
ghstack-source-id: 7a35059
Pull Request resolved: #134812
[ghstack-poisoned]
jiayisunx added a commit that referenced this pull request Sep 4, 2024
ghstack-source-id: 85e498b
Pull Request resolved: #134812
@Skylion007

Copy link
Copy Markdown
Collaborator

Nice! I got stuck on figuring out the compile error with the blend, glad you were able to find a workaround.

@jiayisunx
jiayisunx marked this pull request as ready for review October 11, 2024 07:43
@jiayisunx
jiayisunx requested a review from mingfeima October 11, 2024 07:44
[ghstack-poisoned]
jiayisunx added a commit that referenced this pull request Oct 12, 2024
ghstack-source-id: bc15dff
Pull Request resolved: #134812
@jiayisunx jiayisunx added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 12, 2024
@Skylion007

Skylion007 commented Oct 14, 2024 •

Copy link
Copy Markdown
Collaborator

One failure is just a flake. @malfet Any idea what's going on with the other failure here? Seems like it might be MPS specific.

@Skylion007

Skylion007 commented Oct 14, 2024 •

Copy link
Copy Markdown
Collaborator

Ah, seems like it's tripping up the CPU fallback? Not sure what minor version MPS the runners are using?

TORCH_WARN_ONCE("MPS: grid_sampler_2d op is supported natively starting from macOS 13.2. ",

@Skylion007
Skylion007 requested a review from malfet October 14, 2024 17:57
@malfet

malfet commented Oct 14, 2024

Copy link
Copy Markdown
Collaborator

Ah, seems like it's tripping up the CPU fallback? Not sure what minor version MPS the runners are using?

TORCH_WARN_ONCE("MPS: grid_sampler_2d op is supported natively starting from macOS 13.2. ",

There are running 13.2, so this is not the problem, looks like issue is simple the accuracy, so just add op to the list of FP16_LOW_PRECISION ops or just xfail that test for float16

@Skylion007

Copy link
Copy Markdown
Collaborator

Yeah, makes sense. Simlar ops like Upsample etc are already in the LOW_PRECISION list.

jiayisunx added a commit that referenced this pull request Oct 23, 2024
ghstack-source-id: b76dece
Pull Request resolved: #134812
[ghstack-poisoned]
@Skylion007

Copy link
Copy Markdown
Collaborator

Just need to add fp16 version to low precision op list in the MPS consistency test framework.

[ghstack-poisoned]
@jiayisunx
jiayisunx requested a review from kulinseth as a code owner November 6, 2024 07:30
@pytorch-bot pytorch-bot Bot added the ciflow/mps Run MPS tests (subset of trunk) label Nov 6, 2024
jiayisunx added a commit that referenced this pull request Nov 6, 2024
ghstack-source-id: 3d2e810
Pull Request resolved: #134812
[ghstack-poisoned]
jiayisunx added a commit that referenced this pull request Nov 6, 2024
ghstack-source-id: 703b7a1
Pull Request resolved: #134812
[ghstack-poisoned]
@jiayisunx

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/mps Run MPS tests (subset of trunk) ciflow/trunk Trigger trunk jobs on your pull request Merged module: cpu CPU specific problem (e.g., perf, algorithm) module: inductor open source release notes: onnx torch.onnx related changes that should show up in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants