NVIDIA cuSPARSELt

0.9.0 · active · verified Thu Apr 09

NVIDIA cuSPARSELt is a Python binding to the NVIDIA cuSPARSELt library, providing highly optimized routines for sparse matrix-matrix multiplication (SpMM) on NVIDIA GPUs. This specific package, `nvidia-cusparselt-cu13`, targets CUDA Toolkit 13.x. It's a low-level library typically used for high-performance computing and deep learning workloads involving sparse data structures. Its release cadence is generally tied to major CUDA Toolkit updates.

Warnings

Install

Imports

Quickstart

This quickstart verifies the installation by attempting to retrieve the cuSPARSELt library version. It requires a compatible NVIDIA GPU and drivers to run successfully, as cuSPARSELt operates directly on the GPU.

from cuda import cusparselt
import sys

try:
    # Get cuSPARSELt properties (e.g., version)
    major, minor = cusparselt.cusparseltGetProperty()
    print(f"Successfully initialized cuSPARSELt. Version: {major}.{minor}")
except Exception as e:
    print(f"Error initializing cuSPARSELt: {e}", file=sys.stderr)
    print("Ensure an NVIDIA GPU is available and compatible CUDA drivers are installed.", file=sys.stderr)

view raw JSON →