Enable upper for torch.linalg.cholesky#62434
Enable upper for torch.linalg.cholesky#62434walterddr wants to merge 3 commits intopytorch:masterfrom
Conversation
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 49f485a (more details on the Dr. CI page):
❄️ 1 failure tentatively classified as flakybut reruns have not yet been triggered to confirm:
|
lezcano
left a comment
There was a problem hiding this comment.
This looks good, thanks!
Could you also add some tests to make sure the argument works as we expect?
Note that we have the identity cholesky(A, upper=True) == cholesky(A).transpose(-2, -1).conj() and an equivalent one for cholesky_ex.
There was a problem hiding this comment.
Perhaps
whether to return an upper triangular matrix. The tensor returned with
upper=Trueis the conjugate transpose of the tensor returned withupper=False.
Same in cholesky_ex.
6f704f6 to
96f41fb
Compare
There was a problem hiding this comment.
these seems to be introducing backward incompatible changes to libtorch API (if i understand the CI job correctly). Should we keep those original signatures and redispatch them with default upper=False argument? did torch.cholesky have similar signature?
There was a problem hiding this comment.
torch.cholesky did have a similar signature. Any change in function signature in native_functions.yaml is marked as backward-incompatible change. If we want to ignore it for now, then an entry to allow_list in test/backward_compatibility/check_backward_compatibility.py should be added.
96f41fb to
8852eaf
Compare
|
@walterddr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: a bug was discovered in #62434, for some reason comparing the schema name didn't match the allow_list item. So: 1. remove duplicate regex compile 2. make use of the schema string is used instead of just the name Pull Request resolved: #62687 Reviewed By: ezyang Differential Revision: D30102437 Pulled By: walterddr fbshipit-source-id: 541b2ed77948f24daebb08623cadabb034a241e0
e2729f2 to
cad0eb4
Compare
cad0eb4 to
49f485a
Compare
|
@walterddr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
@walterddr merged this pull request in 3782f3e. |
|
|
||
| # "_ex" stands for experimental | ||
| - func: linalg_cholesky_ex(Tensor self, *, bool check_errors=False) -> (Tensor L, Tensor info) | ||
| - func: linalg_cholesky_ex(Tensor self, *, bool upper=False, bool check_errors=False) -> (Tensor L, Tensor info) |
There was a problem hiding this comment.
This is actually an FC-breaking change but it's probably OK because this function is so new
| upper (bool, optional): whether to return an upper triangular matrix. | ||
| The tensor returned with upper=True is the conjugate transpose of the tensor | ||
| returned with upper=False. | ||
| check_errors (bool, optional): controls whether to check the content of ``infos``. Default: `False`. |
|
cc @t-vi |
Summary: a bug was discovered in pytorch#62434, for some reason comparing the schema name didn't match the allow_list item. So: 1. remove duplicate regex compile 2. make use of the schema string is used instead of just the name Pull Request resolved: pytorch#62687 Reviewed By: ezyang Differential Revision: D30102437 Pulled By: walterddr fbshipit-source-id: 541b2ed77948f24daebb08623cadabb034a241e0
Summary: Fixes pytorch#61988 Pull Request resolved: pytorch#62434 Reviewed By: seemethere, tktrungna Differential Revision: D30079806 Pulled By: walterddr fbshipit-source-id: 044efb96525155c9bc7953ac4ad47c1b7c12fb20
Fixes #61988