pub enum AccelX4 {
NeonI8mm,
Portable,
}Expand description
Which ×4 GEMM kernel this host runs, resolved once instead of once
per call.
The gemm_*_group_x4 entry points are called once per (row-group ×
activation-quad) pair, which on a pp512 projection is 10^4 to 10^5
calls per GEMM. Each one used to re-run is_aarch64_feature_detected!,
whose relaxed atomic load LLVM cannot hoist out of the caller’s loop.
Callers now probe once per matmul and pass the answer down through the
_on variants; gemm_q4_kx8_group_x4 and its siblings stay as
probe-per-call wrappers so existing callers and tests are unchanged.
This is a dispatch decision only. Both arms compute the same values,
bit-identically, which is what the *_x4_portable_is_bit_exact_vs_scalar_gemv
tests assert. Forcing AccelX4::Portable on an i8mm host is therefore
a valid (slow) way to run, and the tests use it that way.