Skip to content

GPU Gesvd_truncate: cusolverDnDgesvdj returns CUSOLVER_STATUS_EXECUTION_FAILED (CUDA 13) #1102

Description

@yingjerkao

Summary

On CUDA 13, linalg::Gesvd_truncate on a GPU tensor makes cusolverDnDgesvdj return CUSOLVER_STATUS_EXECUTION_FAILED, which checkCudaErrors turns into a fatal abort. Because it aborts the whole gpu_test_main process, it also prevents any test registered after it from running.

CUDA error at src/backend/linalg_internal_gpu/cuGeSvd_internal.cu:244 code=6(CUSOLVER_STATUS_EXECUTION_FAILED)
  "cusolverDnDgesvdj(cusolverH, jobz, econ, N, M, (data_type *)Mij, ldA, (data_type *)S->data(),
   (data_type *)vTMem, ldu, (data_type *)UMem, ldvT, (data_type *)d_work, lwork, devinfo, gesvdj_params)"

Where

src/backend/linalg_internal_gpu/cuGeSvd_internal.cu:244 — the cusolverDnDgesvdj (Jacobi SVD) call in the Double GPU Gesvd path.

Failing test

GesvdTruncate.GpuFlagCombinations (tests/gpu/linalg_test/truncate_test.cpp). It runs Gesvd_truncate on a random 6×5 tensor for Double and ComplexDouble; the Double case aborts on the gesvdj call. Minimal shape of the repro:

Tensor T = Tensor({6, 5}, Type.Double).to(Device.cuda);
InitTensorUniform(T);                       // values in [-1000, 1000]
linalg::Gesvd_truncate(T, /*keepdim=*/3, 0., true, true);   // -> CUSOLVER_STATUS_EXECUTION_FAILED

Environment

  • CUDA 13.0 (nvcc V13.0.88), cuSOLVER bundled with CUDA 13
  • NVIDIA RTX 4070 Ti SUPER, sm_89
  • -DUSE_CUDA=ON -DUSE_CUTENSOR=OFF -DUSE_CUQUANTUM=OFF, Debug + ASan

Notes / relationship to other issues

Suggested follow-up

Investigate the gesvdj_params / jobz / econ setup and devinfo handling for cusolverDnDgesvdj under CUDA 13; when EXECUTION_FAILED is returned, devinfo should be read to report which superdiagonal failed to converge rather than aborting. A guard to skip the GPU SVD/QR tests when the required cuSOLVER path is unavailable would also keep the rest of gpu_test_main runnable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions