Repository navigation
dgesdd: Handle norm nan value - #471
Conversation
|
Thanks Julien. We probably want to propagate the fix to SGESDD, CGESDD, and ZGESDD then. |
|
ok, done |
|
minor suggestion, return info = N+1 instead of 1, that lets users distinguish non-convergence from NAN entries. Otherwise, looks good. |
|
Right, same as @thijssteel. I like the direct return if there is a NaN in the input matrix A. I am not sure about INFO=1 though. What about INFO=-4 ? That would be for "invalid input A". That would be consistent with INFO = -2 for example when the input M is invalid. Or INFO = -3 when the input N is invalid, etc. I do not think we return INFO = -4 (invalid input) for an invalid array yet, but I think we can start on this. So: INFO = -4 ? |
|
yes! |
Codecov Report
@@ Coverage Diff @@
## master #471 +/- ##
==========================================
- Coverage 83.23% 83.23% -0.01%
==========================================
Files 1820 1820
Lines 170835 170847 +12
==========================================
+ Hits 142195 142199 +4
- Misses 28640 28648 +8
Continue to review full report at Codecov.
|
|
So now, codecov is not happy because we do not have a test to check that INFO=-4 is triggered correctly. Oh well. So, during the tester, we should do a 4x4 matrix (for example), put a NaN in it, send it to xGESDD and make sure xGESDD returns INFO=-4. So, maybe we put this (adding a check for INFO=-4 to xGESDD) on our TODO list and accept this Pull Request from @jschueller. BTW: thanks @jschueller |
|
Of note, Jim Demmel made a nice presentation a year ago on "Correctness of Floating-Point Programs: Exception Handling and Reproducibility". The slides are https://people.eecs.berkeley.edu/~demmel/ExceptionHandling_Reproducibility_Feb20.pptx |
|
This has now caused a regression in NumPy by way of OpenBLAS - numpy/numpy#18914 so there appear to be some codebases who rely on the previous behaviour of silently propagating the NaN |
|
it should probably added to the doc then |
dgesdd: Handle norm nan value
Closes #469