Skip to content

Removed torch.cholesky and added torch.linalg.cholesky#3274

Open
IvanYashchuk wants to merge 1 commit into
pytorch:masterfrom
IvanYashchuk:remove-deprecated-cholesky
Open

Removed torch.cholesky and added torch.linalg.cholesky#3274
IvanYashchuk wants to merge 1 commit into
pytorch:masterfrom
IvanYashchuk:remove-deprecated-cholesky

Conversation

@IvanYashchuk

@IvanYashchuk IvanYashchuk commented Jan 3, 2022

Copy link
Copy Markdown
Contributor

torch.cholesky was deprecated in the 1.9 release and will be removed in the next 1.11 release. This PR removes cholesky and replaces it with the linalg_cholesky.

pytorch/pytorch#70979 that removes deprecated torch.cholesky from PyTorch is currently blocked by pytorch/xla.

@IvanYashchuk

Copy link
Copy Markdown
Contributor Author

CI checks pass. @JackCaoG, could you please review this PR and #3273, #3272?

@JackCaoG

Copy link
Copy Markdown
Collaborator

@IvanYashchuk Will do today

@JackCaoG JackCaoG self-requested a review January 28, 2022 19:18

@JackCaoG JackCaoG left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please give me a ping before you merge the pytorch pr

@IvanYashchuk IvanYashchuk force-pushed the remove-deprecated-cholesky branch 2 times, most recently from f01f21e to 16d12d4 Compare April 5, 2023 12:37
Copilot AI review requested due to automatic review settings May 27, 2026 12:39
@IvanYashchuk IvanYashchuk force-pushed the remove-deprecated-cholesky branch from 0d21de9 to ddddae9 Compare May 27, 2026 12:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 cholesky with linalg_cholesky in XLA autocast op registration.
  • Update native function codegen list to generate linalg_cholesky instead of cholesky.
  • 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.

Comment thread test/test_ops.py
Comment thread codegen/xla_native_functions.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants