Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rename btrisolve to lu_solve#18726

Closed
vishwakftw wants to merge 7 commits into
pytorch:masterfrom
vishwakftw:btrisolve-to-lu_solve
Closed

Rename btrisolve to lu_solve#18726
vishwakftw wants to merge 7 commits into
pytorch:masterfrom
vishwakftw:btrisolve-to-lu_solve

Conversation

@vishwakftw
Copy link
Copy Markdown
Contributor

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

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
Copy link
Copy Markdown
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

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

LGTM. The CI seems to not be working right now

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@vishwakftw
Copy link
Copy Markdown
Contributor Author

@pytorchbot rebase this please

@vishwakftw
Copy link
Copy Markdown
Contributor Author

@zou3519, I have rebased and the CI is green (except for unrelated test failures). Is this good to go?

@zou3519
Copy link
Copy Markdown
Contributor

zou3519 commented Apr 4, 2019

image

I'm not sure if the lint is broken on master, but it looks like this might need another rebase?

@vishwakftw
Copy link
Copy Markdown
Contributor Author

@zou3519 I have rebased it again; I didn’t notice the merge conflicts on my phone. Thank you for letting me know.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a 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.

Comment thread torch/functional.py Outdated
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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this needs to be changed to stacklevel

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(I made the change in-place)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, I'm sorry about that. Thank you for fixing it.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a 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.

Comment thread torch/functional.py Outdated
"""
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)
Copy link
Copy Markdown
Contributor

@zou3519 zou3519 Apr 5, 2019

Choose a reason for hiding this comment

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

@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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've changed it. Sorry about this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No worries, I missed these on my initial review

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a 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.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@vishwakftw
Copy link
Copy Markdown
Contributor Author

@zou3519 is this good to go?

@zou3519
Copy link
Copy Markdown
Contributor

zou3519 commented Apr 9, 2019

It should be good to go, I've been struggling with landing it however

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@vishwakftw
Copy link
Copy Markdown
Contributor Author

Please let me know how I can help to get this landed.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Apr 9, 2019
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
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@zou3519 merged this pull request in 487388d.

@vishwakftw vishwakftw deleted the btrisolve-to-lu_solve branch April 19, 2019 17:24
zhangguanheng66 pushed a commit to zhangguanheng66/pytorch that referenced this pull request May 6, 2019
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
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
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
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.

4 participants