Skip to content

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Mar 20, 2025

That could be used to safely cast floating values to int by adding an ULP, which is a followup after #146456

Fixes #149591

(Not adding unittest as it's just going to be too slow)
Test plan:

% python3 -c "import torch; torch.pinverse(torch.rand(50000, 8193))"

Before the change errored out with

RuntimeError: false INTERNAL ASSERT FAILED at "pytorch/pytorch/aten/src/ATen/native/BatchLinearAlgebra.cpp":1605, please report a bug to PyTorch. linalg.svd: Argument 12 has illegal value. Most certainly there is a bug in the implementation calling the backend library.

That could be used to safely cast floating values to int. Followup after #146456

Fixes #149591

(Not adding unittest as it's just going to be too slow)
Copy link

pytorch-bot bot commented Mar 20, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 0496b6d with merge base a268c29 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@malfet malfet requested a review from wdvr March 20, 2025 23:20
@malfet malfet added release notes: linalg_frontend release notes category topic: bug fixes topic category labels Mar 20, 2025
@malfet malfet changed the title [BE] Introduce lapack_work_to_int function [BE] Introduce lapack_work_to_int function Mar 21, 2025
@malfet
Copy link
Contributor Author

malfet commented Mar 21, 2025

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 21, 2025
@pytorchmergebot
Copy link
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

amathewc pushed a commit to amathewc/pytorch that referenced this pull request Apr 17, 2025
That could be used to safely cast floating values to int by adding an ULP, which is a followup after pytorch#146456

Fixes pytorch#149591

(Not adding unittest as it's just going to be too slow)
Test plan:
```
% python3 -c "import torch; torch.pinverse(torch.rand(50000, 8193))"
```

Before the change errored out with
```
RuntimeError: false INTERNAL ASSERT FAILED at "pytorch/pytorch/aten/src/ATen/native/BatchLinearAlgebra.cpp":1605, please report a bug to PyTorch. linalg.svd: Argument 12 has illegal value. Most certainly there is a bug in the implementation calling the backend library.
```
Pull Request resolved: pytorch#149682
Approved by: https://github.com/wdvr
@github-actions github-actions bot deleted the malfet/add-lapack-work-converter branch April 22, 2025 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: linalg_frontend release notes category topic: bug fixes topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'false INTERNAL ASSERT FAILED' when calling torch.pinverse and using torch.float32 on Apple Silicon
3 participants