question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing error checks for cuSOLVER calls

See original GitHub issue

Some linalg routines do not check the dev_info variable for errors after calling cuSOLVER. If it is a negative number, then linalg.LinAlgError should be raised.

Missing checks: inv https://github.com/cupy/cupy/blob/master/cupy/linalg/solve.py#L287-L295 qr https://github.com/cupy/cupy/blob/master/cupy/linalg/decomposition.py#L163-L176

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
niboshicommented, Aug 29, 2019

@hvy Unfortunately it’s not documented, but if my understanding is correct, it has been the central policy since the beginning of the development.

For example, many functions do not accept numpy.ndarrays because supporting that would expose users to unexpected synchronization that is difficult to even notice.

1reaction
kmaehashicommented, Aug 29, 2019

Another case that performs sync to retrieve devInfo to follow NumPy spec:

If the determinant is zero, then sign will be 0 and logdet will be -Inf.

https://github.com/cupy/cupy/blob/97c72a3c729f63fe86bc2349fb9c4433bbd9eeab/cupy/linalg/norms.py#L246-L249

Read more comments on GitHub >

github_iconTop Results From Across the Web

cuSOLVER API Reference - NVIDIA Documentation Center
This is usually caused by the lack of a prior call, an error in the CUDA Runtime API called by the cuSolver routine,...
Read more >
cuSolver doesn't return the correct solution - Stack Overflow
The only clue I have is that the variable singularity is 0, which means the matrix is not invertible, which is odd because...
Read more >
cuSOLVER Library - Rice University
The cuSolver library is a high-level package based on the cuBLAS and cuSPARSE libraries. It combines three separate libraries under a single umbrella, ......
Read more >
cuSOLVER :: CUDA Toolkit Documentation
This error is usually caused by a cudaMemcpyAsync() failure. To correct: check that the hardware, an appropriate version of the driver, and the...
Read more >
First call to eigh(), but not subsequent calls, gives "cusolver error
Hi Forum! I see a cuda error (in a particular situation) the first time I call eigh(), but not on subsequent calls. (This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found