Introduce errstate configuration to control cuSOLVER devInfo and cuBLAS infoArray checks#2437
Introduce errstate configuration to control cuSOLVER devInfo and cuBLAS infoArray checks#2437asi1024 merged 10 commits intocupy:masterfrom
errstate configuration to control cuSOLVER devInfo and cuBLAS infoArray checks#2437Conversation
357cbff to
232c58f
Compare
devInfo checkdevInfo check
|
Added tests for routines where I could come up with negative cases (e.g. singular inputs). I'm not sure how to test the rest of them since the expected negative results are not necessarily obvious nor consistent with NumPy. PTAL. |
|
Could you fix to use |
1d002e2 to
9b68a66
Compare
|
|
||
| @contextlib.contextmanager | ||
| def errstate(*, divide=None, over=None, under=None, invalid=None): | ||
| def errstate(*, divide=None, over=None, under=None, invalid=None, linalg=None): |
There was a problem hiding this comment.
I guess we should document all these arguments in all these functions, in a separate PR.
|
Updated to use |
|
Fixed |
|
Let me update the title of this PR reflect the new changes. |
devInfo checkerrstate configuration to control cuSOLVER devInfo and cuBLAS infoArray checks
| err = True | ||
| err_detail += '\tmatrix[{}]: matrix is singular.\n'.format(i) | ||
| if err: | ||
| raise RuntimeError('matrix inversion failed at getrf.\n' + err_detail) |
There was a problem hiding this comment.
Note that this PR changes this error type to numpy.linalg.LinAlgError.
|
LGTM. Jenkins, test this please. |
|
Successfully created a job for commit fd5cab9: |
|
Jenkins CI test (for commit fd5cab9, target branch master) failed with status FAILURE. |
|
Jenkins, test this please. |
|
Successfully created a job for commit fd5cab9: |
|
Jenkins CI test (for commit fd5cab9, target branch master) succeeded! |
|
LGTM. |
Fixes #2414.
Please review the design.
This PR introduces an environment variable to control (turn on/off) the
devInfocheck after cuSOLVER routine calls. After discussions in the above issue, the default behavior was decided to not check thedevInfo. This PR is labaled asno-compatsince it will silence errors in existing code and break NumPy compatibility.I'm open for discussion about the design and will continue adding tests and documentation once that looks okay.
TODO: