{"id":787,"library":"nvidia-cusolver-cu12","title":"NVIDIA cuSOLVER (CUDA 12)","description":"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.","status":"active","version":"11.7.5.82","language":"python","source_language":"en","source_url":"https://developer.nvidia.com/cusolver","tags":["cuda","nvidia","runtime","machine learning","deep learning","mathematics","linear algebra","gpu"],"install":[{"cmd":"pip install nvidia-cusolver-cu12","lang":"bash","label":"Install latest stable version"}],"dependencies":[{"reason":"cuSOLVER functionality often relies on cuBLAS for basic linear algebra operations.","package":"nvidia-cublas-cu12","optional":false},{"reason":"cuSOLVER includes sparse solvers, which may depend on cuSPARSE.","package":"nvidia-cusparse-cu12","optional":false},{"reason":"Provides NVIDIA JIT LTO (Link-Time Optimization) library, a common dependency for CUDA runtime components.","package":"nvidia-nvjitlink-cu12","optional":false},{"reason":"Native CUDA libraries require a compatible NVIDIA GPU and an installed NVIDIA driver.","package":"NVIDIA GPU and driver","optional":false},{"reason":"While this package provides runtime libraries, a full CUDA Toolkit installation is often required for development or for specific dependent libraries.","package":"CUDA Toolkit","optional":true}],"imports":[{"note":"The `nvidia-cusolver-cu12` package is not designed for direct Python import of symbols. Instead, it serves as a runtime dependency, providing the underlying CUDA binaries that other Python libraries (like CuPy, PyTorch, or TensorFlow) dynamically load and link against to offer CUDA-accelerated functionalities.","symbol":"N/A","correct":"This package provides native shared libraries (e.g., .so, .dll) for cuSOLVER."}],"quickstart":{"code":"import cupy as cp\n\n# This example uses CuPy, which dynamically loads cuSOLVER routines\n# via packages like nvidia-cusolver-cu12 if available.\n\n# Create a random positive definite matrix A and a vector b on the GPU\nA = cp.random.rand(5, 5, dtype=cp.float64)\nA = A @ A.T + cp.identity(5) # Make it symmetric positive definite\nb = cp.random.rand(5, dtype=cp.float64)\n\n# Solve the linear system Ax = b using CuPy's linalg.solve\n# CuPy internally dispatches to cuSOLVER routines for this operation.\nx = cp.linalg.solve(A, b)\n\nprint(\"Matrix A:\\n\", A)\nprint(\"Vector b:\\n\", b)\nprint(\"Solution x:\\n\", x)\n\n# Verify the solution (A @ x - b should be close to zero)\nprint(\"Verification (A @ x - b):\\n\", A @ x - b)\nprint(\"Norm of residual (should be close to zero):\", cp.linalg.norm(A @ x - b))","lang":"python","description":"This quickstart demonstrates how a higher-level library, CuPy, leverages the underlying cuSOLVER libraries provided by `nvidia-cusolver-cu12`. When installed, `cupy.linalg.solve` and other linear algebra functions can utilize cuSOLVER for GPU-accelerated computations. Ensure CuPy is also installed (`pip install cupy-cuda12x`)."},"warnings":[{"fix":"Use a Python library that integrates with cuSOLVER (e.g., CuPy, PyTorch) and ensure `nvidia-cusolver-cu12` is installed in the environment.","message":"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.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"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.","severity":"breaking","affected_versions":"All versions"},{"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'`.","message":"Pip's dependency resolver can struggle with the complex interdependencies among `nvidia-*` packages, leading to slow resolution times or conflicts.","severity":"gotcha","affected_versions":"All 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.","message":"Certain cuSOLVER APIs, particularly within the `cuSOLVERMg` (multi-GPU) and some `cuSOLVERSp` (sparse) modules, have been deprecated in recent CUDA Toolkit versions.","severity":"deprecated","affected_versions":"Specific APIs in CUDA Toolkit 12.x and newer"},{"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>`.","message":"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.","severity":"breaking","affected_versions":"All versions of `nvidia-*` packages distributed via NVIDIA Python Package Index."}],"env_vars":null,"last_verified":"2026-05-12T19:08:43.536Z","next_check":"2026-06-27T00:00:00.000Z","problems":[{"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.","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.","error":"ImportError: libcusolver.so.X: cannot open shared object file: No such file or directory"},{"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.","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.","error":"torch._C._LinAlgError: cusolver error: CUSOLVER_STATUS_EXECUTION_FAILED"},{"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.","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.","error":"Failed to create cuSolverDN instance"},{"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.","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.","error":"undefined symbol: cusolverDnXsyevBatched_bufferSize, version libcusolver.so.11"},{"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.","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.","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."}],"ecosystem":"pypi","meta_description":null,"install_score":0,"install_tag":"stale","quickstart_score":0,"quickstart_tag":"stale","pypi_latest":"11.7.5.82","cli_name":null,"install_checks":{"last_tested":"2026-05-12","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":1,"wheel_type":null,"failure_reason":"build_error","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":34.2,"import_time_s":null,"mem_mb":null,"disk_size":"2.1G"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":1,"wheel_type":null,"failure_reason":"build_error","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":32.6,"import_time_s":null,"mem_mb":null,"disk_size":"2.1G"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":1,"wheel_type":null,"failure_reason":"build_error","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":29.5,"import_time_s":null,"mem_mb":null,"disk_size":"2.1G"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":1,"wheel_type":null,"failure_reason":"build_error","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":28.4,"import_time_s":null,"mem_mb":null,"disk_size":"2.1G"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":1,"wheel_type":null,"failure_reason":"build_error","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":34.7,"import_time_s":null,"mem_mb":null,"disk_size":"2.1G"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]},"quickstart_checks":{"last_tested":"2026-04-24","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":-1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":-1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":-1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":-1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":-1}]}}