-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Workaround for gather_out in MPS backend #135543
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
…st are ones. Avoids an underlying issue in reshape op in MPS.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/135543
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 0e65478 with merge base 4717cd1 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
@pytorchbot rebase |
// If this op is failing and isMacos15_3 = 1, the OS level fix has not | ||
// landed and we'll need to increment the version check until it does. | ||
bool workaroundSingleDim = (self_arg.squeeze().sizes().size() == 1 && self_arg.sizes().size() > 1); | ||
bool isMacos15_3 = is_macos_13_or_newer(MacOSVersion::MACOS_VER_15_3_PLUS); |
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.
This feels wrong to me. We don't know what will or will not be fixed in macOS-15.3, so let's not condition this workaround. When OS is released we can add the check and run tests
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Rebase failed due to Command
Raised by https://github.com/pytorch/pytorch/actions/runs/12402330979 |
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.
Hmm, I just run this test on 2.6.0 release candidate and it seems to be working just fine, so may be test needs to be expanded
@jhavukainen do you know if it got fixed on OS end by any chance? |
@malfet I confirmed that the change landed in MacOS 15.2. I'll add the now accurate OS version check back |
@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: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
@pytorchbot merge -f "Lint and MPS are green" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Avoids an underlying issue in reshape op in MPS that gets triggered when the input has multiple dimensions but the shape can be squeezed into 1D. The underlying issue is going to get fixed eventually.
Fixes #135240