Skip to main content

Module sparse

Module sparse 

Source
Expand description

Compressed Sparse Row (CSR) synaptic map for GPU-optimized execution.

Replaces dense $N \times N$ weight matrices with adjacency lists stored in CSR format, reducing VRAM pressure and enabling warp-optimized shared memory pulls.

§Layout

row_ptr:    [0, 3, 7, 10, ...]        — start index in col_indices/values per neuron
col_indices:[0, 5, 12, 1, 3, 8, 15, ...] — target neuron indices
values:     [0.9, -0.15, 0.3, ...]     — synaptic weights

For a 2048-neuron network with ~5% connectivity, this reduces storage from ~16 MB (dense f32) to ~800 KB (sparse), a 20× reduction.

Structs§

NeuronStateSnapshot
Per-neuron state snapshot for adaptation-aware routing.
RoutingPolicy
A routing policy equation for scoring neurons.
SparseSynapticMap
Compressed Sparse Row representation of the synaptic weight matrix.
SparseSynapticMapBuilder
Builder for constructing a sparse synaptic map with a fluent API.
Synapse
A single sparse synaptic connection.

Constants§

MAX_SPARSE_NEURONS
Largest neuron count a u16 CSR target can address (0..=u16::MAX).