Skip to main content

spmm_preprocess

Function spmm_preprocess 

Source
pub fn spmm_preprocess<T: SparseScalar>(
    handle: &Handle,
    op_a: Op,
    op_b: Op,
    alpha: &T,
    a: &SpMat<'_, T>,
    b: &DnMat<'_, T>,
    beta: &T,
    c: &mut DnMat<'_, T>,
    alg: SpMMAlg,
    workspace: &mut DeviceBuffer<u8>,
) -> Result<()>
Expand description

One-time preprocessing before spmm. Pre-computes algorithm-specific state into workspace so subsequent spmm calls (with the same A sparsity pattern + dimensions) are faster. Use this when the same matrix is multiplied many times.