syevjBatched from cuSOLVER sometimes doesn't work correctly
See original GitHub issueI didn’t find this issue being reported. I’d like to let CuPy team know that cuSOLVER’s syevjBatched
(cupy.cusolver._syevj_batched
) contains a bug leading to wrong results for some inputs. Eigenvalues are just the diagonal of the matrix, that is not correct. Single matrix input syevj
doesn’t have this problem.
In [1]: import cupy
In [2]: cupy.random.seed(1)
In [3]: for i in range(3):
...: a = cupy.random.normal(size=(2, 3, 3))
...:
In [4]: cupy.cusolver._syevj_batched(a, "L", True)
Out[4]:
(array([[-3.64909523, -1.09802557, -0.98772015],
[-1.23675442, 1.13945238, 1.79567052]]),
array([[[ 0. , 1. , 0. ],
[ 1. , 0. , 0. ],
[ 0. , 0. , 1. ]],
[[-0.34828366, -0.32597124, 0.87888637],
[ 0.90845376, -0.34853093, 0.23073352],
[ 0.23110659, 0.87878834, 0.41751742]]]))
# eigenvalues above are just sorted diagonal elements
In [5]: a[0].diagonal()
Out[5]: array([-1.09802557, -3.64909523, -0.98772015])
# correct result for the 0th matrix is
In [6]: cupy.cusolver.syevj(a[0], "L", True)
Out[6]:
(array([-3.74866036, -1.15578506, -0.83039553]),
array([[-0.1051637 , 0.8504732 , -0.51539881],
[ 0.98278763, 0.00972565, -0.18448274],
[ 0.15188504, 0.52592846, 0.83685733]]))
In [2]: cupy.show_config()
OS : Linux-5.4.0-65-generic-x86_64-with-glibc2.31
CuPy Version : 8.5.0
NumPy Version : 1.19.4
SciPy Version : 1.6.0
Cython Build Version : 0.29.22
CUDA Build Version : 11000
CUDA Driver Version : 11020
CUDA Runtime Version : 11000
cuBLAS Version : 11200
cuFFT Version : 10201
cuRAND Version : 10201
cuSOLVER Version : (10, 6, 0)
cuSPARSE Version : 11101
NVRTC Version : (11, 0)
Thrust Version : 100909
CUB Build Version : 100909
cuDNN Build Version : 8100
cuDNN Version : 8004
NCCL Build Version : 2804
NCCL Runtime Version : 2804
cuTENSOR Version : None
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
cuSOLVER API Reference - NVIDIA Documentation Center
To correct: call cusolverCreate() prior to the function call; and check that the hardware, an appropriate version of the driver, and the cuSolver...
Read more >cuSOLVER Library - Rice University
This function reports residual of syevj or sygvj. It does not support. syevjBatched. If the user calls this function after syevjBatched, the error....
Read more >Segmentation Fault in Pycuda using NVIDIA's cuSolver Library
Try modifying the cusolverLUFactorization() function as follows: ... m, n, int(mtx_gpu.gpudata), n, ctypes.pointer(work)) print status print work.value.
Read more >Accelerating Spectroscopic Data Processing Using Python ...
labels, it sometimes difficult to decipher the names of low-level ... of a syevjBatched function in CUDA cuSOLVER library which.
Read more >Wave-packet continuum discretisation for nucleon ... - arXiv
Speeding up computations very often comes at the expense of accuracy ... In this work we employ the standard MI method [17] which...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@anaruse might this be a cuda bug?
Oh, that’s right, my bad… I should sleep more.