Rename btrisolve to lu_solve#18726
Conversation
Changelog: - Rename `btrisolve` to `lu_solve` to remain consistent with names of solve methods (`cholesky_solve`, `triangular_solve`, `solve`) - Fix all callsites - Rename all tests - Create a tentative alias for `lu_solve` under the name `btrisolve` and add a deprecation warning to not promote usage Test Plan: - All tests should pass to confirm that the patch is correct
zou3519
left a comment
There was a problem hiding this comment.
LGTM. The CI seems to not be working right now
facebook-github-bot
left a comment
There was a problem hiding this comment.
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pytorchbot rebase this please |
|
@zou3519, I have rebased and the CI is green (except for unrelated test failures). Is this good to go? |
|
@zou3519 I have rebased it again; I didn’t notice the merge conflicts on my phone. Thank you for letting me know. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
| removed in the next release. Please use :func:`torch.lu_solve` instead. | ||
| """ | ||
| warnings.warn("torch.btrisolve is deprecated in favour of torch.lu_solve and will be " | ||
| "removed in the next release. Please use torch.lu_solve instead.", stackleve=2) |
There was a problem hiding this comment.
this needs to be changed to stacklevel
There was a problem hiding this comment.
(I made the change in-place)
There was a problem hiding this comment.
Oh, I'm sorry about that. Thank you for fixing it.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
| """ | ||
| warnings.warn("torch.btrisolve is deprecated in favour of torch.lu_solve and will be " | ||
| "removed in the next release. Please use torch.lu_solve instead.", stacklevel=2) | ||
| return torch.lu_solve(b=b, LU_data=LU_data, LU_pivots=LU_pivots, out=out) |
There was a problem hiding this comment.
@vishwakftw I think b=b is wrong. Calling this directly gets the following:
TypeError: lu_solve() missing 3 required positional argument: "input", "LU_data", "LU_pivots"
There was a problem hiding this comment.
(this should probably just be torch.lu_solve(b, LU_data=LU_data, LU_pivots=LU_pivots, out=out)). I don't know how native_functions.yaml names the first argument.
There was a problem hiding this comment.
I've changed it. Sorry about this.
There was a problem hiding this comment.
No worries, I missed these on my initial review
facebook-github-bot
left a comment
There was a problem hiding this comment.
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@zou3519 is this good to go? |
|
It should be good to go, I've been struggling with landing it however |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
Please let me know how I can help to get this landed. |
Summary: Changelog: - Rename `btrisolve` to `lu_solve` to remain consistent with names of solve methods (`cholesky_solve`, `triangular_solve`, `solve`) - Fix all callsites - Rename all tests - Create a tentative alias for `lu_solve` under the name `btrisolve` and add a deprecation warning to not promote usage Pull Request resolved: pytorch/pytorch#18726 Differential Revision: D14726237 Pulled By: zou3519 fbshipit-source-id: bf25f6c79062183a4153015e0ec7ebab2c8b986b
Summary: Changelog: - Rename `btrisolve` to `lu_solve` to remain consistent with names of solve methods (`cholesky_solve`, `triangular_solve`, `solve`) - Fix all callsites - Rename all tests - Create a tentative alias for `lu_solve` under the name `btrisolve` and add a deprecation warning to not promote usage Pull Request resolved: pytorch#18726 Differential Revision: D14726237 Pulled By: zou3519 fbshipit-source-id: bf25f6c79062183a4153015e0ec7ebab2c8b986b
Summary: Changelog: - Rename `btrisolve` to `lu_solve` to remain consistent with names of solve methods (`cholesky_solve`, `triangular_solve`, `solve`) - Fix all callsites - Rename all tests - Create a tentative alias for `lu_solve` under the name `btrisolve` and add a deprecation warning to not promote usage Pull Request resolved: pytorch#18726 Differential Revision: D14726237 Pulled By: zou3519 fbshipit-source-id: bf25f6c79062183a4153015e0ec7ebab2c8b986b

Changelog:
btrisolvetolu_solveto remain consistent with names of solve methods (cholesky_solve,triangular_solve,solve)lu_solveunder the namebtrisolveand add a deprecation warning to not promote usageTest Plan: