`torch.linalg.eig` works on a tensor but not `eigh()`

Hello,

I am trying to compute the eigenvalues and eigenvectors of a hessian matrix (H). H is computed by convolving a volumetric tensor (V) with a second-order derivatives of a gaussian kernel (G).

while trying to compute the eigenvalues and eigenvectors of H, I want to use eigh() since H is a symmetric matrix, but it throws this error:

*** RuntimeError: cusolver error: CUSOLVER_STATUS_INVALID_VALUE, when calling `cusolverDnSsyevjBatched_bufferSize( handle, jobz, uplo, n, A, lda, W, lwork, params, batchsize)`

However, when I use eig(), it works fine but is really slow.
Iā€™m not able to figure out a reason for this.

For context, H is of shape BxN^3x3x3 where N is the size of my volumetric grid. And the grid V is filled by querying points for occupancy using the octree based algorithm described in MISE.
However, if I query the occupancy densely instead of octree-based, eigh works fine and backpropagates as well.

1 Like

Could you post a minimal and executable code snippet reproducing the issue as well as the output of python -m torch.utils.collect_env, please?