Skip to content

v2.4.0 – New Primitives, VNNI & Scalar Simulator

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 30 Nov 12:29
· 36 commits to develop since this release
v2.4.0
1f4b787

This release adds about forty functions (arithmetic, math, bit manipulation, searches, structure loads and stores, non-temporal memory), native VNNI dot products on x86, and a simulator in the API Explorer that runs the scalar reference of a function in the browser.

⚠️ Breaking Changes

  • Register size macros: MIPP_<ISA>_RVD_SIZE_BIT, MIPP_<ISA>_RVD_SIZE_BYTE, MIPP_<ISA>_RVD_ALIGN_BYTE and MIPP_RVD_SIZE_BYTE are renamed MIPP_<ISA>_VD_* and MIPP_VD_SIZE_BYTE, the last remains of the old register naming.
  • Masks are bool in the C++ Functional and Object APIs: any, all, none, testz and get_k return a bool. set_k takes a bool array and set1_k a bool. The Vm constructor from an array takes a bool array, and the int32_t one is deleted. The C API is unchanged.

✨ New Functions

Family Functions
Arithmetic mulhi, avg, absdiff, wmul, dot2, dot4, dot4us
Math floor, ceil, rcp, log2, log10, log1p, expm1, cbrt, hypot
Comparison isnan, isinf, isfinite
Bit manipulation popcount, clz, ctz, rotl, rotr, byteswap
Sequences & searches iota / iota(s0), firstn, findfirst, findlast, argmin, argmax
Rearrangement insert(v, x, i), the inverse of get
Structure loads / stores loadu_unzip2/3/4, storeu_zip2/3/4 (one register per field)
Memory storent (non-temporal store); utilities prefetch, prefetchw, storent_fence
  • Masked variants: argmin / argmax (Z), dot2 / dot4 / dot4us (M, Z, S).
  • mipp::info(), alias of mipp_info() in the C++ APIs.

🚀 Implementations & Code Generation

  • x86 VNNI dot products for dot2, dot4 and dot4us: AVX-512 VNNI, AVX-VNNI, AVX-VNNI-INT8 / INT16 and AVX10.2.
  • A generic iota built from vectors.
  • MIPP_FORCE_INLINE on the functions with an immediate dispatch (slide, rotate, bcast, get, insert, the shifts and their _b128 variants) in every layer, so that the constant reaches the __builtin_constant_p dispatch in large translation units. Define MIPP_FORCE_INLINE as inline before including MIPP to let the compiler choose.
  • Registry:
    • a function can belong to several categories (loadu_unzip* are also loads, storeu_zip* are also stores);
    • the new domain field gives the lanes outside of which a function is undefined.
  • Scalar references: the integer add, sub, mul, FMA variants, hadd and hmul compute in uint64_t, so they wrap around as documented instead of overflowing as signed integers.

🔎 API Explorer

  • New Semantics tab (Mathematical Semantics, C Semantics, Simulator). The simulator runs the scalar reference of a function in the browser: the references are compiled for WebAssembly for register sizes from 128 to 2048 bits and every LMUL.
  • Tooltips for the macros of the scalar references.
  • Zoom over the dependency graph.
  • New target features: NEON DotProd, RVV Zvbb, AVX-512 VPOPCNTDQ / BITALG and AVX10.2.

📚 Documentation

  • The NaN semantics of min, max, hmin and hmax, measured per target.
  • The prefetch instructions per target and the role of storent_fence.
  • The latest release shown in the documentation now comes from the Git tags.

🐛 Fixes

  • The index register of gather / scatter in the Object API is vd0, as in C and C++.
  • The index of the upper half of a register group (get) is a uint32_t.
  • wmul compiles in C++11.
  • iota and firstn on half-vectors (MIPP_LDIV_2) no longer break the build of the fine-grained NEON headers on ARMv7 (float64).
  • slideup_b128 with GCC 13 on SVE.

📦 Assets

mipp-v2.4.0-headers.zip and mipp-v2.4.0-headers.tar.gz contain the generated headers for all targets (SSE, AVX, AVX-512, NEON, SVE, RVV, scalar), with the fine-grained headers.

Documentation: https://aff3ct.github.io/MIPP/

Full Changelog: v2.3.0...v2.4.0