Atomic Ops kernel subset
Source: https://github.com/Akseleu-J/atomic-ops
Revision: a9bd7c5315907d23ccf1ce6b033d46a196566888 (PyPI 0.1.0 compute sources)
License: MIT; see LICENSE for the original copyright and permission notice.

The benchmark uses the published atomic-ops==0.1.0 package as the baseline.
The candidate derives from its configs.py, gdn2_fwd.py, gdn2_bwd.py, and
gdn2_pipeline.py and removes clipping, non-finite
replacement, and damping. It replaces off-diagonal pairwise reductions
with boundary-centered matrix products and masks diagonal blocks before
exponentiation. Diagonal masks use full-rank iotas to avoid an unsupported
TPU boolean reshape. Both causal and strict-diagonal masks are applied
before feature reduction, avoiding a post-reduction mask relayout.
Use a feature-first diagonal score layout on v4 to
avoid its unsupported sublane gather on trailing-feature reduction.
Use the feature-last layout on v5e/v5p/v6e.
The v4 backward path transposes the state-decay reduction to preserve lane
layout and processes diagonal pair gradients in 16-query-row tiles.
Micro-solver rows are statically unrolled to avoid
runtime indexing; hardware compilation is validated separately from CPU
interpretation.

Inputs to these experimental kernels must reside on a single device.
The independent recurrence in reference.py serves as the CPU test oracle.

Benchmark source and measurements are archived at:
https://github.com/marin-community/marin-logbooks/issues/42
