Repository navigation
crmvec 0.12.0: a faster fast mode, with versioned results
The fast mode (crmvec-run --fast; x86-64 with AVX2 and FMA) now binds each AVX2
entry point at load time straight to its kernel, which holds the rounding-mode
test, instead of testing the CPU and the rounding mode and then calling it. On
an AMD EPYC 7773X it takes a median 1.02 times glibc 2.41's libmvec time (from
1.09), floats 1.00 (from 1.17), and is at or under glibc on 23 of the 52
functions (from 16). Its results are unchanged.
The fast mode's results are now versioned. Unlike the correctly rounded mode's,
they are defined by its kernels, not by mathematics, so a change to a kernel
would change them. fast/bits-v1.txt records kernel version 1: the fast
libraries of 0.10.0, 0.11.1 and 0.12.0 give the same results, and make
check-fast fails on any library that doesn't. A release that changes a result
will bump the version and say so (docs/fast-mode.md, "Versions").
Fixed: crmvec-stamp recorded a crmvec-run --fast run as correctly rounded. It
now records the fast mode, not correctly rounded, with its kernel version
(FastKernelVersion in crmvec-libm.json). A fast-mode run stamped with 0.11.0
or 0.11.1 says "correctly rounded" where it should say fast mode.
New: docs/distros.md, what crmvec changes on 14 LTS distributions (glibc 2.17
to 2.43): which functions are not correctly rounded there, which depend on the
CPU, and each image's glibc package, with the raw output and the probes to
rerun it (make craccuracy craccuracy-zsign cpupath).
Unchanged: the correctly rounded library, libcrpreload.so, and the 165
CORE-MATH files (as of e78b460).
Checked before the tag: CI on x86-64 and arm64; the Fedora 44, Nix and
Ubuntu 24.04 packages, each running make check; the conda package as
conda-forge builds it (gcc 15, glibc 2.17), whose fast library gives kernel
version 1's results on every float input; make check-fast in full on an AMD
EPYC 7773X; and make check and the preload's check (620,756,992 calls, every
rounding mode, with and without FZ) natively on a Neoverse N1.