8000 [MPS] lu unpack by Isalia20 · Pull Request #146681 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[MPS] lu unpack #146681

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

Closed
wants to merge 11 commits into from
Closed

[MPS] lu unpack #146681

wants to merge 11 commits into from

Conversation

Isalia20
Copy link
Collaborator
@Isalia20 Isalia20 commented Feb 7, 2025

Implements lu unpack function on MPS. Haven't added new tests because they are covered by removing the lu_unpack from UNIMPLEMENTED_XFAILLIST in test_mps with test_output_match function

Copy link
pytorch-bot bot commented Feb 7, 2025

🔗 Helpful Links

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

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

⏳ No Failures, 48 Pending

As of commit 144b499 with merge base 002accf (image):
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot bot added the release notes: mps Release notes category label Feb 7, 2025
Copy link
Contributor
github-actions bot commented Feb 7, 2025

Attention! native_functions.yaml was changed

If you are adding a new function or defaulted argument to native_functions.yaml, you cannot use it from pre-existing Python frontend code until our FC window passes (two weeks). Split your PR into two PRs, one which adds the new C++ functionality, and one that makes use of it from Python, and land them two weeks apart. See https://github.com/pytorch/pytorch/wiki/PyTorch's-Python-Frontend-Backward-and-Forward-Compatibility-Policy#forwards-compatibility-fc for more info.


Caused by:

@malfet malfet added ciflow/mps Run MPS tests (subset of trunk) topic: improvements topic category labels Feb 7, 2025
if (unpack_data) {
Tensor L_part = r < c ? at::slice(LU_data, -1, 0, k) : LU_data;
L.copy_(L_part.tril());
ndim == 2 ? L.diagonal().fill_(1) : L.diagonal(0, -2, -1).fill_(1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit

Suggested change
ndim == 2 ? L.diagonal().fill_(1) : L.diagonal(0, -2, -1).fill_(1);
(ndim == 2 ? L.diagonal() : L.diagonal(0, -2, -1)).fill_(1);

L.copy_(L_part.tril());
ndim == 2 ? L.diagonal().fill_(1) : L.diagonal(0, -2, -1).fill_(1);

Tensor U_part = r < c ? LU_data : at::slice(LU_data, -2, 0, k);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will create a dispatch...

@malfet
Copy link
Contributor
malfet commented Feb 7, 2025

@pytorchbot merge -f "Mac tests are green, will do some followup PR for the error checking"

< 8000 p class="ml-1 mb-2 mt-2" data-show-on-error hidden> Sorry, something went wrong.

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

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
Collaborator

Merge failed

Reason: PR #146681 has not been reviewed yet

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@malfet
Copy link
Contributor
malfet commented Feb 8, 2025

@pytorchbot merge -f "Will do error checking in followup PRs"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

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

Raymo111 pushed a commit that referenced this pull request Feb 20, 2025
Implements lu unpack function on MPS. Haven't added new tests because they are covered by removing the lu_unpack from UNIMPLEMENTED_XFAILLIST in test_mps with `test_output_match` function
Pull Request resolved: #146681
Approved by: https://github.com/malfet

Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/mps Run MPS tests (subset of trunk) Merged open source release notes: mps Release notes category topic: improvements topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0