-
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPS backend started using neural engine and fails to multiply matrices in fp16 #110975
Comments
[Edit] Can reproduce it on M1 using torch-2.0.1 build, but no warning using torch-2.1.0:
But also, error does not seem to be fatal, does it? |
Thanks @malfet and @okuvshynov for the issue. This feature is new and not fully tested, so it was disabled in 2.1.0. We are going to do more testing and enable it in Inference mode. Also as you noticed FP32 runs with full precision on GPU by default. |
awesome, thank you, upgraded to 2.1.0 |
ok to close? |
馃悰 Describe the bug
At some point, most likely after macOS update to Sonoma, torch mps backend started utilizing ANE instead of GPU for matrix multiplication in fp16.
Unfortunately, for large enough matrices it fails:
I have two apple machines, one updated to Sonoma and one running Ventura.
Sonoma version fails fp16 multiplication:
fp32 succeeds in both versions.
Here're some screenshots illustrating that ANE being utilized in sonoma (but it's also evident from the error above).
Ventura - GPU only:
Sonoma - tries using ANE.
Does pytorch have any control over these details?
Versions
Uses ANE and fails at
Uses GPU and succeeds
cc @seemethere @malfet @osalpekar @atalman @kulinseth @albanD @DenisVieriu97 @razarmehr @abhudev
The text was updated successfully, but these errors were encountered: