Skip to content

Commit a25c3b1

Browse files
committed
WIP
1 parent 87cd963 commit a25c3b1

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

tools/torchfix/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,19 @@ To enable them, use standard flake8 configuration options for the plugin mode or
4848

4949
If you encounter a bug or some other problem with TorchFix, please file an issue on
5050
https://github.com/pytorch/test-infra/issues, mentioning [TorchFix] in the title.
51+
52+
53+
## Rules
54+
55+
### TOR001 Use of removed function
56+
57+
#### torch.solve
58+
59+
This function was deprecated since PyTorch version 1.9 and is now removed.
60+
61+
`torch.solve` is deprecated in favor of `torch.linalg.solve`.
62+
`torch.linalg.solve` has its arguments reversed and does not return the LU factorization.
63+
64+
To get the LU factorization see `torch.lu`, which can be used with `torch.lu_solve` or `torch.lu_unpack`.
65+
66+
`X = torch.solve(B, A).solution` should be replaced with `X = torch.linalg.solve(A, B)`.

tools/torchfix/torchfix/deprecated_symbols.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
- name: torch.solve
2+
deprecate_pr: https://github.com/pytorch/pytorch/pull/57745
3+
remove_pr: https://github.com/pytorch/pytorch/pull/57745
4+
reference:
5+
16
- name: torch.qr
27
deprecate_pr: https://github.com/pytorch/pytorch/pull/57745
38
remove_pr:

0 commit comments

Comments
 (0)