Skip to content
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

[BE] Introduce lapack_work_to_int function #149682

Closed
wants to merge 3 commits into from

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

svekars pushed a commit that referenced this pull request Mar 21, 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.
```
Pull Request resolved: #149682
Approved by: https://github.com/wdvr
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