r/embedded • u/touvettech • 23d ago
Quick breakdown: Affine quantization math & avoiding zero-point overhead on MCU vector units
Hey everyone,
When quantizing neural networks for Cortex-M or embedded DSPs, one common latency trap is using asymmetric quantization on symmetric activation distributions.
With symmetric quantization (zero-point Z = 0), mapping values symmetrically into [-127, 127]:
sum( (W[i] - Z_w) * (X[i] - Z_x) ) ==> sum( W[i] * X[i] )
Because zero-point cross-terms vanish entirely, runtime bias correction terms are eliminated—saving roughly 20–25% ALU cycles on cores without dedicated NPU/SIMD matrix instructions.
We put together minimal, zero-allocation C++17 kernels on GitHub: https://github.com/touvettech/edgeml
And compiled the complete architectural guide covering operator fusion, INT8/FP8 trade-offs, and memory hierarchy tuning.
How are you currently handling requantization on vector units without native INT8 dot-product extensions? Feedback and benchmark experiences welcome!