brainevent.binary_densemm_p

Contents

brainevent.binary_densemm_p#

brainevent.binary_densemm_p = <brainevent.XLACustomKernel object>#

Low-level XLA custom-kernel primitive for binary_densemm.

This XLACustomKernel instance dispatches the binary (event-driven) dense matrix-matrix multiplication operation to registered backends. On GPU, cuda_raw is the WPR event-driven CUDA backend and remains the default; jax_raw provides a pure JAX reference path, and cublas provides an optional float32/bool cuBLAS path.

The operation computes weights[m,k] @ spikes[k,n] -> out[m,n] when transpose=False, or weights[k,m].T @ spikes[k,n] -> out[m,n] when transpose=True, where only active (nonzero) spike entries contribute to the output.

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_densemm_p.available_backends(platform), and the default backend can be configured with binary_densemm_p.set_default(platform, backend).

See also

binary_densemm

High-level user-facing function wrapper.