Expand description
Batched sparse operations.
This module provides routines for executing many small sparse operations in a single logical batch, amortising kernel launch overhead and enabling fusion when beneficial.
§Provided types
BatchedSpMV– batched sparse matrix-vector multiply (host-side loop).BatchedSpMVPlan– precomputed plan with concatenated CSR arrays.UniformBatchedSpMV– optimised path when all matrices share structure.BatchedSpGEMM– batched sparse-sparse matrix multiply.BatchedTriSolve– batched sparse triangular solve.BatchScheduler– heuristic-based execution strategy selector.
Structs§
- Batch
Scheduler - Heuristic-based scheduler that decides how to execute a batch.
- Batched
SpGEMM - Batched sparse-sparse matrix multiplication.
- Batched
SpMV - Batched sparse matrix-vector multiplication.
- Batched
SpMV Plan - Precomputed plan for batched SpMV execution.
- Batched
TriSolve - Batched sparse triangular solve.
- Uniform
Batched SpMV - Optimised batched SpMV when all matrices share the same sparsity pattern.
Enums§
- Strategy
- Execution strategy chosen by
BatchScheduler.
Functions§
- batched_
spmv_ cpu - Batched SpMV (CPU reference): compute
y_i = A * x_ifor allbRHS vectors. - generate_
batched_ spmv_ ptx - Generate a batched SpMV PTX kernel that processes all matrices via offset arrays in a single launch.
- mixed_
precision_ spmv_ cpu - Mixed-precision SpMV (CPU reference): matrix values stored in FP16 range, accumulation performed in FP64, result cast to FP32.