Removed torch.qr and added torch.linalg.qr#3273
Conversation
|
@IvanYashchuk head is green again, please rebase and the build should pass |
|
@IvanYashchuk Is the upstream pr going to make it to the pytorch 1.11? We will do our branch cur soon too. |
|
It won't merged for 1.11 branch cut. Because of some internal issues removing of these deprecated functionality is postponed to the next 1.12 release. |
|
@IvanYashchuk Sounds good. We have a large pr we need to merge to pt/xla 1.10 and I was waiting for you to merge your pr first. I guess in this case I will try to merge that giant pr and it might cause some merge conflicts for you. |
fcc267a to
9b550e5
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 QR support from the deprecated aten::qr path to aten::linalg_qr, and updates registrations/tests accordingly.
Changes:
- Switches the IR op kind and native function entrypoint from
qrtolinalg_qr. - Updates autocast kernel registration to
linalg_qrand removes/avoidsqr. - Updates C++ tests to call
torch::linalg_qrand updates the supported-op list.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| torch_xla/csrc/ops/qr.cpp | Renames the node’s op kind to aten::linalg_qr. |
| torch_xla/csrc/autocast_mode.cpp | Registers autocast kernel for linalg_qr and drops qr. |
| torch_xla/csrc/aten_xla_type.cpp | Implements XLANativeFunctions::linalg_qr with mode parsing. |
| codegen/xla_native_functions.yaml | Marks linalg_qr as supported (replacing qr). |
| test/cpp/test_aten_xla_tensor_2.cpp | Updates the QR test to use torch::linalg_qr. |
| test/test_ops.py | Removes a commented-out allowed-op entry for qr. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9b550e5 to
7f160da
Compare
torch.qrwas deprecated in the 1.9 release and will be removed in the next 1.11 release. This PR removesqrand replaces it with thelinalg_qr.pytorch/pytorch#70989 that removes deprecated functions in PyTorch is currently blocked by pytorch/xla.