|
MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
|
The accumulator for a quad-widening operand PAIR. More...
The accumulator for a quad-widening operand PAIR.
Three pairings, and the asymmetry is the hardware's, not a design choice: VNNI implements unsigned x signed natively (_mm_dpbusd_epi32) because that is the shape of quantized inference – unsigned activations against signed weights. Symmetric i8 x i8 is native only from AVX10.2 (_mm_dpbssd_epi32); before that Highway emulates it with two dpbusd calls plus a shift and subtract, so it costs about three times the native form on every x86 shipping today. NEON has all three natively.
(int8, uint8) is deliberately absent rather than silently reordered: a dot product is symmetric, so a caller holding that pairing should swap the arguments and get the native instruction, and being told so at compile time is better than being given the emulated path without knowing.