-
Notifications
You must be signed in to change notification settings - Fork 24.3k
scaled_dot_product_attention crashes on apple silicon #149132
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
Labels
module: crash
Problem manifests as a hard crash, as opposed to a RuntimeError
module: mps
Related to Apple Metal Performance Shaders framework
module: sdpa
All things related to torch.nn.functional.scaled_dot_product_attentiion
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Milestone
Comments
Confirmed that it crashes with the latest main branch build. Crash is due to the mismatch in num_head dimensions(dim=1). I can take a look at this |
pytorchbot
pushed a commit
that referenced
this issue
Mar 26, 2025
Fixes #149132 Pull Request resolved: #149147 Approved by: https://github.com/malfet (cherry picked from commit dd6e9df)
malfet
pushed a commit
that referenced
this issue
Mar 27, 2025
[MPS] fix attention enable_gqa crash on mps (#149147) Fixes #149132 Pull Request resolved: #149147 Approved by: https://github.com/malfet (cherry picked from commit dd6e9df) Co-authored-by: Isalia20 <irakli.salia854@gmail.com>
65 tasks
Verified that the repro works on the current rc build and that it fails on torch==2.7.0.dev20250312
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
module: crash
Problem manifests as a hard crash, as opposed to a RuntimeError
module: mps
Related to Apple Metal Performance Shaders framework
module: sdpa
All things related to torch.nn.functional.scaled_dot_product_attentiion
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
4 participants
Uh oh!
There was an error while loading. Please reload this page.
🐛 Describe the bug
This following python code fails and ends the process on macos 15.3.1 (M1 Pro).
with the following logs:
Changing device to CPU and it works fine. Setting n_kv_head to 4 also resolves the issue.
Versions
I'm using uv the version script fails.
I've tested with python 2.6.0 and the 2025-03-11 nightly.
cc @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen
The text was updated successfully, but these errors were encountered: