Skip to content

Fix workarea compute in lapackSyevd - #146456

Closed
wdvr wants to merge 5 commits into
mainfrom
wdvr/iss_145801
Closed

wdvr wants to merge 5 commits into
mainfrom
wdvr/iss_145801

Conversation

@wdvr

@wdvr wdvr commented Feb 5, 2025 •

Copy link
Copy Markdown
Contributor

work-query APIs return floating point values, that could loose precision when converted back to int. Solve this by using nextafter and ceil
Add regression test

Fixes #145801

@pytorch-bot

pytorch-bot Bot commented Feb 5, 2025 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (4 Unrelated Failures)

As of commit 3d05dd8 with merge base a9ed7bd (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@pytorch-bot pytorch-bot Bot added the release notes: linalg_frontend release notes category label Feb 5, 2025
@wdvr
wdvr marked this pull request as ready for review February 5, 2025 08:59
@wdvr wdvr changed the title WIP increase LWORK by 1 to avoid too small array coming from lapackSyevd Increase LWORK by 1 to avoid too small array coming from lapackSyevd Feb 5, 2025
@wdvr wdvr changed the title Increase LWORK by 1 to avoid too small array coming from lapackSyevd Round up LWORK / LRWORK to avoid too small array coming from lapackSyevd Feb 5, 2025
@malfet malfet changed the title Round up LWORK / LRWORK to avoid too small array coming from lapackSyevd Fix workarea compute in lapackSyevd Feb 7, 2025
@wdvr

wdvr commented Feb 7, 2025

Copy link
Copy Markdown
Contributor Author

@pytorchmergebot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 7, 2025
@pytorchmergebot

Copy link
Copy Markdown
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

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@malfet

malfet commented Feb 10, 2025

Copy link
Copy Markdown
Collaborator

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged while ignoring the following 4 checks: pull / linux-focal-cuda12.4-py3.10-gcc9 / test (default, 2, 5, lf.linux.4xlarge.nvidia.gpu), linux-binary-manywheel / manywheel-py3_9-cuda12_4-test / test, linux-binary-manywheel / manywheel-py3_9-cuda12_6-test / test, linux-binary-manywheel / manywheel-py3_9-cuda11_8-test / test

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

@github-actions
github-actions Bot deleted the wdvr/iss_145801 branch March 13, 2025 02:09
malfet added a commit that referenced this pull request Mar 20, 2025
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)
pytorchmergebot 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
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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

torch.linalg.eigh fails on CPU

3 participants