brainevent.binary_coomv_p

Contents

brainevent.binary_coomv_p#

brainevent.binary_coomv_p = <brainevent.XLACustomKernel object>#

Low-level XLA custom-kernel primitive for binary_coomv.

This XLACustomKernel instance dispatches the binary (event-driven) COO sparse matrix-vector multiplication operation to registered backends (numba, pallas), using runtime shape/dtype metadata provided by the high-level wrapper.

The operation computes result[i] = sum_j A[i, j] * (v[j] > 0) when transpose=False or result[j] = sum_i A[i, j] * (v[i] > 0) when transpose=True, where only active (nonzero) events in v contribute to the output. This makes the operation efficient for spike-based neural network simulations.

Beyond backend dispatch, the primitive stores JAX transformation bindings (JVP, transpose, batching, and call registration) so the operation integrates correctly with jit, vmap, and autodiff.

Available backends can be queried with binary_coomv_p.available_backends(platform), and the default backend can be configured with binary_coomv_p.set_default(platform, backend).

See also

binary_coomv

High-level user-facing function wrapper.