-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Remove deprecated linear algebra functions (and methods) #22841
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
Conversation
Changelog: - Removed the following linear algebra functions in PyTorch in favor of the renamed operations - `btrifact` (use `lu` instead) - `btrifact_with_info` (use `lu` with `get_infos=True` instead) - `btrisolve` (use `lu_solve` instead) - `btriunpack` (use `lu_unpack` instead) - `gesv` (use `solve` instead) - `pstrf` (use `cholesky` instead) - `potrf` (use `cholesky` instead) - `potri` (use `cholesky_inverse` instead) - `potrs` (use `cholesky_solve` instead) - `trtrs` (use `triangular_solve` instead) - Removed dead code after the removal of `pstrf` Test Plan: - All existing tests should pass to verify that the removal is clean
|
I'll take a look by EOD tomorrow (Wednesday) but if anyone gets to this earlier, please feel free to review |
| return torch._C._VariableFunctions.chain_matmul(matrices) | ||
|
|
||
|
|
||
| def pstrf(a, upper=True, out=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we wanted to be even safer we could just make this a hard error and fully remove it in the next release. How long have these functions been deprecated for already?
|
@pytorchbot rebase this please |
|
Sorry, I can't merge this because there are conflicts. To merge this yourself, run the commands below: (To learn more about this bot, see Bot commands.) |
| CPU: legacy::cpu::_th_potri | ||
| CUDA: legacy::cuda::_th_potri | ||
|
|
||
| - func: pstrf(Tensor self, bool upper=True, Scalar tol=-1, *, Tensor(a!) u, Tensor(b!) pivot) -> (Tensor(a!) u, Tensor(b!) pivot) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm worried about C++ API users. I'm not sure if this function is exposed to the c++ API (I hope it's not) but we didn't add a deprecation warning there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yf225 what are our guarantees on the C++ API? I think we just renamed things like gesv -> solve at some point in the past, but maybe the C++ API was more unstable then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think tensor.pstrf is exposed to the C++ API because things inTensor.h are public APIs.
In general I think it's more important to maintain parity between Python and C++ frontend, and it's okay to break BC for C++ API here. (Here https://pytorch.org/cppdocs/ we also mentioned that "the C++ API should be considered “beta” stability" and "we may make major breaking changes to the backend in order to improve the API".)
zou3519
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This needs a rebase I think.
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Changelog: - Removed the following linear algebra functions in PyTorch in favor of the renamed operations - `btrifact` (use `lu` instead) - `btrifact_with_info` (use `lu` with `get_infos=True` instead) - `btrisolve` (use `lu_solve` instead) - `btriunpack` (use `lu_unpack` instead) - `gesv` (use `solve` instead) - `pstrf` (use `cholesky` instead) - `potrf` (use `cholesky` instead) - `potri` (use `cholesky_inverse` instead) - `potrs` (use `cholesky_solve` instead) - `trtrs` (use `triangular_solve` instead) - Removed dead code after the removal of `pstrf` Pull Request resolved: pytorch/pytorch#22841 Test Plan: - All existing tests should pass to verify that the removal is clean Closes pytorch/pytorch#22832 Differential Revision: D16346184 Pulled By: zou3519 fbshipit-source-id: f748d16ed7609c028de6adcbc28684d5a1af0678
Changelog:
Removed the following linear algebra functions in PyTorch in favor of the renamed operations
btrifact(useluinstead)btrifact_with_info(useluwithget_infos=Trueinstead)btrisolve(uselu_solveinstead)btriunpack(uselu_unpackinstead)gesv(usesolveinstead)pstrf(usecholeskyinstead)potrf(usecholeskyinstead)potri(usecholesky_inverseinstead)potrs(usecholesky_solveinstead)trtrs(usetriangular_solveinstead)Removed dead code after the removal of
pstrfTest Plan:
Closes #22832