← Lab
bf16mma
mixedC++ · NEON / Apple M4Systems & data structuresJuly 12, 2026
the question
Does the M4's bf16 matrix instruction (NEON BFDOT/BFMMLA) beat a naive bf16-to-fp32 loop?
what came out
~6.8x faster, but the accuracy 'win' is a single-accumulator strawman: a matched-lane 4-accumulator fp32 loop is more accurate than BFDOT. bf16 buys speed, not accuracy, and it isn't bit-deterministic under regrouping. Exact fp64 oracle.
method & receipts
- Result: mixed
- Pre-registered — the prediction was written down and committed before the run.
→ read the code and re-run it
github.com/v-code01/bf16mma