Skip to main content

Module cusparse

Module cusparse 

Source
Expand description

Thin safe-ish wrappers over cudarc::cusparse::sys entry points Phase 4 needs but the safe layer doesn’t provide.

Every wrapper:

  1. Translates a cusparseStatus_t into a crate::error::GpuError::LibraryError tagged "cusparse".
  2. Funnels cusparseDestroy* calls into a Drop so descriptors do not leak when an error short-circuits the pipeline.

Higher-level orchestration (descriptor caches, workspace pooling) lives in crate::kernel::sparse.

Structs§

DnMatGuard
RAII guard for a cusparseDnMatDescr_t.
DnVecGuard
RAII guard for a cusparseDnVecDescr_t.
SpGemmDescGuard
RAII guard for a cusparseSpGEMMDescr_t.
SpMatGuard
RAII guard for a cusparseSpMatDescr_t.
SpSvDescGuard
RAII guard for a cusparseSpSVDescr_t.

Enums§

SddmmAlg
Algorithm tag for cusparseSDDMM.
SpGemmAlg
Algorithm tag for cusparseSpGEMM.
SpMmAlg
Algorithm tag for cusparseSpMM.
SpMvAlg
Algorithm tag to use for cusparseSpMV. Public so kernel/sparse/spmv.rs can plumb it through the request struct in a future phase.
SpSvAlg
Algorithm tag for cusparseSpSV.

Functions§

ok
Convert a cuSPARSE status into a Result<(), GpuError>.