NVIDIA cuSOLVER (CUDA 12)
raw JSON → 11.7.5.82 verified Tue May 12 auth: no python install: stale quickstart: stale
The `nvidia-cusolver-cu12` package provides the native runtime libraries for NVIDIA's cuSOLVER, a collection of GPU-accelerated dense and sparse direct linear solvers and Eigen solvers. It is part of the NVIDIA CUDA Toolkit and is designed to be consumed by higher-level Python libraries such as CuPy, PyTorch, and TensorFlow for dynamically loading CUDA libraries. The current version is 11.7.5.82, and its release cadence typically follows major and minor updates of the CUDA Toolkit.
pip install nvidia-cusolver-cu12 Common errors
error ImportError: libcusolver.so.X: cannot open shared object file: No such file or directory ↓
cause This error typically occurs when the required cuSOLVER shared library (libcusolver.so.X, where X is a version number) cannot be found by the dynamic linker, often due to a CUDA Toolkit version mismatch with the consuming library (e.g., TensorFlow, PyTorch, or CuPy) or an incorrectly configured LD_LIBRARY_PATH environment variable.
fix
Ensure that the installed CUDA Toolkit version is compatible with the library you are using (check official compatibility tables). Set the
LD_LIBRARY_PATH environment variable to include the directory containing the libcusolver.so file (e.g., /usr/local/cuda/lib64), or install the exact CUDA version expected by the framework. In some cases, a symbolic link might be created from the existing libcusolver.so.Y to the expected libcusolver.so.X, but this is not recommended across major CUDA versions. error torch._C._LinAlgError: cusolver error: CUSOLVER_STATUS_EXECUTION_FAILED ↓
cause This PyTorch-specific runtime error indicates a failure within the cuSOLVER library during a linear algebra operation, often caused by invalid input data (e.g., matrices containing NaN values or very ill-conditioned matrices) passed to a cuSOLVER function.
fix
Check the input tensors for
NaN or inf values using torch.isnan() or torch.isinf() and handle them appropriately (e.g., by filtering or replacing them). Also, ensure that the input matrix is well-conditioned for the specific linear algebra operation being performed. If the inputs are clean, ensure your CUDA and PyTorch installations are compatible and consider updating your NVIDIA drivers. error Failed to create cuSolverDN instance ↓
cause This TensorFlow error occurs when TensorFlow is unable to initialize an instance of the cuSOLVER library's dense solver (cuSolverDN), often indicating an issue with GPU memory allocation or an environment problem, especially within Docker containers.
fix
Enable GPU memory growth in TensorFlow to allow it to allocate memory as needed, preventing pre-allocation issues. For example:
physical_devices = tf.config.list_physical_devices('GPU'); tf.config.experimental.set_memory_growth(physical_devices[0], True). Ensure your TensorFlow, CUDA, and cuSOLVER versions are compatible. error undefined symbol: cusolverDnXsyevBatched_bufferSize, version libcusolver.so.11 ↓
cause This error signifies a symbol lookup failure, meaning that a program (often PyTorch or JAX) expects a specific function symbol (e.g., `cusolverDnXsyevBatched_bufferSize`) from a particular version of `libcusolver.so`, but the loaded library either doesn't contain that symbol or is an incompatible version. This is typically due to a mismatch between the CUDA/cuSOLVER versions used to build the consuming library and the versions installed on the system.
fix
Verify that your PyTorch/JAX and CUDA Toolkit versions are compatible according to their official documentation. Ensure that your
LD_LIBRARY_PATH points to the correct CUDA installation directory to prevent loading an older or incompatible libcusolver.so. In some cases, unset LD_LIBRARY_PATH might resolve conflicts if it's pointing to an incorrect or outdated CUDA installation. Reinstalling PyTorch/JAX with the correct CUDA version can also resolve this. error ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. torch 2.3.1 requires nvidia-cusolver-cu12==11.4.5.107; ... but you have nvidia-cusolver-cu12 11.5.4.101 which is incompatible. ↓
cause This is a `pip` dependency conflict where a higher-level library (like PyTorch or TensorFlow) specifies a precise version requirement for `nvidia-cusolver-cu12`, but a different, incompatible version is either already installed or being proposed by the resolver due to other package constraints.
fix
Install the specific version of
nvidia-cusolver-cu12 required by the main library. For example, if PyTorch requires nvidia-cusolver-cu12==11.4.5.107, explicitly install that version: pip install nvidia-cusolver-cu12==11.4.5.107. When installing frameworks like PyTorch or TensorFlow, follow their recommended installation commands carefully, often specifying cuda versions to ensure all nvidia-* sub-packages are correctly aligned. Using virtual environments (like Conda or venv) helps isolate dependencies and prevent conflicts. Warnings
gotcha The `nvidia-cusolver-cu12` package primarily provides native shared libraries and is not intended for direct Python import and use of symbols. Its functionality is exposed indirectly through other high-level Python libraries like CuPy, PyTorch, or TensorFlow. ↓
fix Use a Python library that integrates with cuSOLVER (e.g., CuPy, PyTorch) and ensure `nvidia-cusolver-cu12` is installed in the environment.
breaking The `cu12` suffix in the package name signifies compatibility with CUDA Toolkit 12.x. Installing this package with an incompatible CUDA Toolkit, GPU driver, or older GPU architecture can lead to runtime errors or performance issues. ↓
fix Ensure your NVIDIA GPU, driver, CUDA Toolkit installation, and all `nvidia-*` Python packages (e.g., `nvidia-cublas-cu12`, `nvidia-cuda-runtime-cu12`) are consistent with the `cu12` version suffix. Major CUDA version changes (e.g., `cu11` to `cu12`) often require a complete reinstallation of all CUDA-related components and potentially recompilation of CUDA-dependent code.
gotcha Pip's dependency resolver can struggle with the complex interdependencies among `nvidia-*` packages, leading to slow resolution times or conflicts. ↓
fix When installing multiple `nvidia-*` packages or libraries that depend on them, explicitly pin exact versions in your `requirements.txt` or install order. For example, `pip install 'nvidia-cusolver-cu12==11.7.5.82'`.
deprecated Certain cuSOLVER APIs, particularly within the `cuSOLVERMg` (multi-GPU) and some `cuSOLVERSp` (sparse) modules, have been deprecated in recent CUDA Toolkit versions. ↓
fix Refer to the NVIDIA CUDA Toolkit documentation for your specific CUDA version to identify deprecated APIs and their recommended replacements. Ensure your application code is updated to use current cuSOLVER APIs.
breaking Many `nvidia-*` Python packages are hosted on the NVIDIA Python Package Index, not directly on PyPI.org. Attempting to install them without configuring pip to use the NVIDIA index will result in a `RuntimeError` indicating the package is a placeholder. ↓
fix Before installing `nvidia-*` packages, install `nvidia-pyindex` to configure pip to use the NVIDIA Python Package Index. The installation command should typically look like: `pip install nvidia-pyindex && pip install <your-nvidia-package>`.
Install compatibility stale last tested: 2026-05-12
python os / libc status wheel install import disk
3.10 alpine (musl) build_error - - - -
3.10 alpine (musl) - - - -
3.10 slim (glibc) wheel 34.2s - 2.1G
3.10 slim (glibc) - - - -
3.11 alpine (musl) build_error - - - -
3.11 alpine (musl) - - - -
3.11 slim (glibc) wheel 32.6s - 2.1G
3.11 slim (glibc) - - - -
3.12 alpine (musl) build_error - - - -
3.12 alpine (musl) - - - -
3.12 slim (glibc) wheel 29.5s - 2.1G
3.12 slim (glibc) - - - -
3.13 alpine (musl) build_error - - - -
3.13 alpine (musl) - - - -
3.13 slim (glibc) wheel 28.4s - 2.1G
3.13 slim (glibc) - - - -
3.9 alpine (musl) build_error - - - -
3.9 alpine (musl) - - - -
3.9 slim (glibc) wheel 34.7s - 2.1G
3.9 slim (glibc) - - - -
Imports
- N/A
This package provides native shared libraries (e.g., .so, .dll) for cuSOLVER.
Quickstart stale last tested: 2026-04-24
import cupy as cp
# This example uses CuPy, which dynamically loads cuSOLVER routines
# via packages like nvidia-cusolver-cu12 if available.
# Create a random positive definite matrix A and a vector b on the GPU
A = cp.random.rand(5, 5, dtype=cp.float64)
A = A @ A.T + cp.identity(5) # Make it symmetric positive definite
b = cp.random.rand(5, dtype=cp.float64)
# Solve the linear system Ax = b using CuPy's linalg.solve
# CuPy internally dispatches to cuSOLVER routines for this operation.
x = cp.linalg.solve(A, b)
print("Matrix A:\n", A)
print("Vector b:\n", b)
print("Solution x:\n", x)
# Verify the solution (A @ x - b should be close to zero)
print("Verification (A @ x - b):\n", A @ x - b)
print("Norm of residual (should be close to zero):", cp.linalg.norm(A @ x - b))