NVIDIA cuSPARSELt

0.8.1 · active · verified Sat Mar 28

NVIDIA cuSPARSELt is a high-performance CUDA library dedicated to general matrix-matrix operations in which at least one operand is a structured sparse matrix. It supports NVIDIA Sparse MMA tensor cores, mixed-precision computation, matrix pruning and compression functionalities, activation functions, and batched computation. The current version is 0.8.1, and the library has an active release cadence with frequent updates.

Warnings

Install

Imports

Quickstart

The `nvidia-cusparselt-cu12` package provides low-level Python bindings to the NVIDIA cuSPARSELt library. It does not typically expose a high-level Python API for direct user interaction. This quickstart demonstrates how to verify that the package and its core CUDA runtime components can be imported successfully, indicating a correct installation in a compatible CUDA environment. Further usage usually involves integrating with frameworks like CuPy or PyTorch that utilize these low-level bindings.

import sys
import subprocess

def check_package(package_name):
    try:
        __import__(package_name)
        print(f"Successfully imported {package_name}")
    except ImportError:
        print(f"Failed to import {package_name}. Please ensure it's installed and your CUDA environment is correctly set up.")
        sys.exit(1)

# This package is primarily for providing underlying CUDA binaries
# for other libraries. A direct high-level API is not typically exposed.
# The primary quickstart is to ensure successful installation and importability.

print("Verifying nvidia-cusparselt-cu12 installation...")
check_package('nvidia.cusparselt')

# Additional checks for CUDA runtime components (optional, but good practice)
print("Verifying core NVIDIA CUDA runtime components...")
check_package('nvidia.cuda_runtime')

print("Installation verification complete. Ensure your CUDA-enabled applications can leverage cuSPARSELt.")

view raw JSON →