brainevent.coomm_p

Contents

brainevent.coomm_p#

brainevent.coomm_p = <brainevent.XLACustomKernel object>#

Low-level XLA custom-kernel primitive for coomm.

This XLACustomKernel instance dispatches the COO sparse matrix-matrix multiplication with floating-point weights operation to registered backends (numba, pallas), using runtime shape/dtype metadata provided by the high-level wrapper.

The operation computes Y[i, n] = sum_k A[i, k] * B[k, n] when transpose=False or Y[k, n] = sum_i A[i, k] * B[i, n] when transpose=True, where A is a sparse matrix in COO format and B is a dense matrix. This is the standard sparse matrix-matrix multiplication with full floating-point arithmetic.

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

See also

coomm

High-level user-facing function wrapper.