torch.tril introduces NaNs on MPS when matrix contained Infs (when diagonal is negative) #149813
Labels
module: correctness (silent)
issue that returns an incorrect result silently
module: mps
Related to Apple Metal Performance Shaders framework
module: NaNs and Infs
Problems related to NaN and Inf handling in floating point
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Uh oh!
There was an error while loading. Please reload this page.
🐛 Describe the bug
Temporary workaround: transpose + triu (with positive diagonal) + transpose (or move to CPU and back to MPS)
Versions
torch installed with uv: the collect_env.py script breaks, because
python -mpip
failspytorch 2.6.0
python 3.12.9
Mac M2
cc @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen
The text was updated successfully, but these errors were encountered: