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
test_cond_cpu tests fail when running with numpy
compiled against OpenBLAS 0.3.15
#67675
Labels
module: linear algebra
Issues related to specialized linear algebra operations in PyTorch; includes matrix multiply matmul
module: NaNs and Infs
Problems related to NaN and Inf handling in floating point
module: openblas
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Comments
mruberry
added
module: linear algebra
Issues related to specialized linear algebra operations in PyTorch; includes matrix multiply matmul
module: NaNs and Infs
Problems related to NaN and Inf handling in floating point
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
labels
Nov 2, 2021
Thanks for reporting this issue, @casparvl! |
lezcano
added a commit
that referenced
this issue
Nov 2, 2021
implementations Fixes #67675 [ghstack-poisoned]
lezcano
added a commit
that referenced
this issue
Nov 2, 2021
implementations Fixes #67675 cc mruberry [ghstack-poisoned]
lezcano
added a commit
that referenced
this issue
Nov 3, 2021
implementations Fixes #67675 cc mruberry [ghstack-poisoned]
lezcano
added a commit
that referenced
this issue
Nov 11, 2021
implementations Fixes #67675 cc mruberry [ghstack-poisoned]
seemethere
added a commit
that referenced
this issue
Nov 15, 2021
Summary: Pull Request resolved: #67679 implementations Fixes #67675 cc mruberry Test Plan: Imported from OSS Reviewed By: anjali411 Differential Revision: D32368698 Pulled By: mruberry fbshipit-source-id: 3ea6ebc43c061af2f376cdf5da06884859bbbf53 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> ghstack-source-id: 856e69d7e57f4e8cd8c794feda9487f006c7dfde
seemethere
added a commit
that referenced
this issue
Nov 15, 2021
…n using OpenBLAS" implementations Fixes #67675 cc mruberry Differential Revision: [D32368698](https://our.internmc.facebook.com/intern/diff/D32368698) [ghstack-poisoned]
seemethere
added a commit
that referenced
this issue
Nov 15, 2021
implementations Fixes #67675 cc mruberry Differential Revision: [D32368698](https://our.internmc.facebook.com/intern/diff/D32368698) [ghstack-poisoned]
jambayk
pushed a commit
to jambayk/pytorch
that referenced
this issue
Feb 11, 2022
…7679) Summary: Pull Request resolved: pytorch#67679 implementations Fixes pytorch#67675 cc mruberry Test Plan: Imported from OSS Reviewed By: anjali411 Differential Revision: D32368698 Pulled By: mruberry fbshipit-source-id: 3ea6ebc43c061af2f376cdf5da06884859bbbf53
jambayk
pushed a commit
to jambayk/pytorch
that referenced
this issue
Feb 14, 2022
…7679) Summary: Pull Request resolved: pytorch#67679 implementations Fixes pytorch#67675 cc mruberry Test Plan: Imported from OSS Reviewed By: anjali411 Differential Revision: D32368698 Pulled By: mruberry fbshipit-source-id: 3ea6ebc43c061af2f376cdf5da06884859bbbf53
jambayk
pushed a commit
to jambayk/pytorch
that referenced
this issue
Feb 14, 2022
…7679) Summary: Pull Request resolved: pytorch#67679 implementations Fixes pytorch#67675 cc mruberry Test Plan: Imported from OSS Reviewed By: anjali411 Differential Revision: D32368698 Pulled By: mruberry fbshipit-source-id: 3ea6ebc43c061af2f376cdf5da06884859bbbf53
malfet
pushed a commit
that referenced
this issue
Feb 15, 2022
…72820) Summary: Pull Request resolved: #67679 implementations Fixes #67675 cc mruberry Test Plan: Imported from OSS Reviewed By: anjali411 Differential Revision: D32368698 Pulled By: mruberry fbshipit-source-id: 3ea6ebc43c061af2f376cdf5da06884859bbbf53 Co-authored-by: lezcano <lezcano-93@hotmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
module: linear algebra
Issues related to specialized linear algebra operations in PyTorch; includes matrix multiply matmul
module: NaNs and Infs
Problems related to NaN and Inf handling in floating point
module: openblas
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
🐛 Bug
The following tests fail in the
PyTorch 1.10.0
test suite when usingnumpy
compiled withOpenBLAS 0.3.15
:The failure looks like this:
The reason is that OpenBLAS changed behavior as to how NaN's are propagated, see numpy/numpy#18914
In the particular case of these PyTorch tests, the input is
And the call being made when the test fails is:
Note that it is only the
nuc
norm that fails, all the others seem to return withinf
.To Reproduce
Steps to reproduce the behavior:
OpenBLAS 0.3.15
run_test.py -i test_linalg.TestLinalgCPU
testsInstead of running the test case, one can also run the failing commands from the test case directly:
Expected behavior
I expected the test to pass :)
Environment
Please copy and paste the output from our
environment collection script
(or fill out the checklist below manually).
You can get the script and run it with:
conda
,pip
, source): SourceAdditional context
The PyTorch tests use the
np.linalg
functions as a reference, and check if the equivalenttorch.linalg
calls produce the same result. In this case, thenp.linalg
function fails because of changed OpenBLAS behavior. This failure is LAPACK implementation-dependent.There is still discussion in numpy/numpy#18914 as to how to deal with the changed OpenBLAS behavior. It seems likely that we should conclude that behavior of
np.linalg.cond
is undefined for inputs that contain aNaN
or that are non-invertible / singular. This will at least be the behavior of all past versions of numpy that are compiled with OpenBLAS 0.3.15. Thus, using test cases in a test suite that rely on singular/non-inveritble inputs fornp.linalg.cond
as a reference is probably not a great idea.The test that fails is the one that uses singular input on purpose
pytorch/test/test_linalg.py
Line 1637 in cd51d2a
In my view, this test should simply be skipped.
cc @jianyuh @nikitaved @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @lezcano
The text was updated successfully, but these errors were encountered: