nvidia-cusparse provides the native NVIDIA cuSPARSE runtime libraries, offering highly optimized routines for sparse matrix computations on NVIDIA GPUs. It is a foundational component for other Python libraries like CuPy to enable sparse GPU operations. The current version is 12.7.9.17, and it typically releases alongside new CUDA toolkit versions.
pip install nvidia-cusparse-cu12Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to create and manipulate sparse matrices on an NVIDIA GPU using CuPy, which internally leverages the `nvidia-cusparse` runtime libraries. This includes creating a COO matrix, converting it to CSR format, and performing a matrix-vector multiplication.
Use a wrapping library like `cupy` (e.g., `import cupy.sparse`) to interact with cuSPARSE functionality in Python.
Ensure the installed `nvidia-cusparse` package matches your system's CUDA toolkit version. Consult NVIDIA's documentation or the respective Python library's (e.g., CuPy) installation guide.
Familiarize yourself with sparse matrix theory and best practices for GPU computing. Utilize performance profiling tools to identify bottlenecks in your sparse GPU workloads.