spmm_native.hh
Go to the documentation of this file.
1#pragma once
2
3// Native batched CSR SpMM, C = alpha*op(A)*op(B) + beta*C. TRAPS: A.nnz() is the batch-max
4// CAPACITY (bound loops by row_offsets); beta == 0 never reads C, alpha == 0 still scales C;
5// no __restrict__ (LOBPCG slices alias); the scatter is not bitwise-repeatable.
6// evidence: docs/perf/spmm.md#spmm-the-kernel-contract
7
11
13
14template <typename T>
15bool spmm_gather_available(); // compiled into this build; not a device query
16
17template <typename T>
18bool spmm_scatter_available(); // independent of gather; each gates can_run
19
20template <typename T>
21Event spmm_native_csr(Queue& ctx, // all nine (transA, transB) spellings, dispatched on transA
23 const MatrixView<T, MatrixFormat::Dense>& B_mat, // own ld/stride: never derive ld*cols
24 const MatrixView<T, MatrixFormat::Dense>& C, // evidence: docs/perf/spmm.md#supports-and-what-is-deliberately-not-in-it
25 T alpha,
26 T beta,
27 Transpose transA,
28 Transpose transB);
29
30} // namespace batchlas::sycl_spmm
Non-owning view of a batch of matrices: the argument type of every entry point.
Definition matrix.hh:485
Enumerations, scalar traits and scalar concepts shared by every public header.
Transpose
The operator op() applied to an operand: op(A) = A, A^T or A^H.
Definition enums.hh:171
The batched containers: Matrix (owning), MatrixView (non-owning), KernelMatrixView (device-side),...
bool spmm_gather_available()
bool spmm_scatter_available()
Event spmm_native_csr(Queue &ctx, const MatrixView< T, MatrixFormat::CSR > &A, const MatrixView< T, MatrixFormat::Dense > &B_mat, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, T beta, Transpose transA, Transpose transB)
Completion handle of enqueued work, returned by every entry point.
Where BatchLAS work runs: a device, a backend, an ordered SYCL queue and a workspace arena.
batchlas::Device, batchlas::Event and batchlas::Queue: where work runs and how it is ordered.