Skip to main content

Module sparse

Module sparse 

Source
Expand description

Spatial [C, C] operators on the device, stored dense or as sparse rows depending on how many weights are nonzero.

Structs§

SparseRows
Rows of a square matrix keeping only nonzero weights, padded to the widest row (ELLPACK).

Enums§

DeviceSpatialMatrix
A [C, C] spatial operator uploaded once, dense or as sparse rows (chosen by SPARSE_MAX_ROW_FILL from the matrix itself).

Constants§

SPARSE_MAX_ROW_FILL
A matrix is stored as sparse rows when its widest row holds at most this fraction of the columns; denser matrices run the dense kernel (fewer index reads).

Functions§

execute_sparse_rows_multiply
output = W · input for a sparse-rows W (values / indices uploaded from SparseRows).
execute_spatial_matrix_multiply
output = W · input for a dense row-major W ([channels, channels]) on a [channels, samples] buffer of F: one matrix product (crate::linalg::matmul).