The `nvidia-cusolver` package is a metapackage that provides the native runtime libraries for NVIDIA's cuSOLVER, along with Python bindings for these GPU-accelerated numerical linear algebra routines. It is tightly coupled with the NVIDIA CUDA Toolkit. This allows Python applications to leverage GPU power for tasks such as solving dense and sparse linear systems, eigenvalue problems, and singular value decompositions. The current version is 12.1.0.51, reflecting its alignment with CUDA Toolkit 12.1. Its release cadence follows major CUDA Toolkit updates.
pip install nvidia-cusolverVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to perform a Cholesky factorization using `cuda.cusolver.potrf`. It requires `cupy` for convenient GPU array creation and manipulation. A cuSOLVER handle is created, workspace size is queried, and then the factorization is executed on a symmetric positive-definite matrix on the GPU.
Ensure that your `nvidia-cusolver` package version, NVIDIA driver, and CUDA Toolkit (if manually installed) are compatible. For example, `nvidia-cusolver` version `12.1.x` is designed for CUDA Toolkit 12.1.
Verify that your system has an NVIDIA GPU and that the correct drivers are installed and up-to-date. Check `nvidia-smi` output to confirm GPU and driver status.
Always use `from cuda import cusolver` to access the cuSOLVER functions in your Python code.
Install `cupy` (e.g., `pip install cupy-cuda12x` for CUDA 12.x) and use `cupy.asarray()` to create arrays on the GPU before passing their data pointers to cuSOLVER functions.
Always check the `info` output parameter of cuSOLVER functions to detect errors. Follow documentation for required workspace sizes and allocate temporary GPU memory accordingly.