Removed torch.cholesky and added torch.linalg.cholesky#3274
Open
IvanYashchuk wants to merge 1 commit into
Open
Removed torch.cholesky and added torch.linalg.cholesky#3274IvanYashchuk wants to merge 1 commit into
IvanYashchuk wants to merge 1 commit into
Conversation
This was referenced Jan 3, 2022
Contributor
Author
Collaborator
|
@IvanYashchuk Will do today |
JackCaoG
approved these changes
Jan 28, 2022
JackCaoG
left a comment
Collaborator
There was a problem hiding this comment.
Please give me a ping before you merge the pytorch pr
f01f21e to
16d12d4
Compare
0d21de9 to
ddddae9
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR migrates XLA support and tests from the deprecated cholesky op to linalg_cholesky, updating codegen and autocast registration accordingly.
Changes:
- Replace
choleskywithlinalg_choleskyin XLA autocast op registration. - Update native function codegen list to generate
linalg_choleskyinstead ofcholesky. - Migrate the C++ Cholesky test and XLA counter expectation to
linalg_cholesky.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| torch_xla/csrc/autocast_mode.cpp | Drops autocast kernel for cholesky and enables linalg_cholesky. |
| test/test_ops.py | Removes cholesky from the allowed ops list. |
| test/cpp/test_aten_xla_tensor_2.cpp | Updates Cholesky test to call torch::linalg_cholesky and checks the new XLA counter name. |
| codegen/xla_native_functions.yaml | Switches full codegen entry from cholesky to linalg_cholesky. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
torch.choleskywas deprecated in the 1.9 release and will be removed in the next 1.11 release. This PR removescholeskyand replaces it with thelinalg_cholesky.pytorch/pytorch#70979 that removes deprecated
torch.choleskyfrom PyTorch is currently blocked by pytorch/xla.