Repository navigation
crmvec 0.10.0
crmvec 0.10.0: a fast mode, for when the same answer everywhere is enough.
Correct rounding costs about three to four times glibc's time on x86-64. Many
programs need their results to be the same on every machine, not correctly
rounded. For them, crmvec now also installs fast/libmvec.so.1:
crmvec-run --fast ./program
Its 52 functions are not correctly rounded. Each one is a fixed sequence of
IEEE operations within OpenCL's accuracy bound for that function (measured as
the OpenCL CTS measures it: the floats on every input), at a median of 1.09
times glibc's time on a Zen 3 core. Every entry point runs the same kernel and
none uses an instruction whose bits vary between processors, so a program gets
the same bits on every x86-64 CPU with AVX2 and FMA, whichever vector width it
was built for. On older CPUs, and outside round-to-nearest, it returns the
correctly rounded results instead. Through PoCL, the OpenCL conformance
tests' math checks pass with it for the six functions PoCL's vectorizer sends
to libmvec (with glibc's libmvec, exp and log fail).
What it gives up is agreement with other libraries: a correctly rounded result
is the one every correct implementation gives, and the fast mode's results
agree only with themselves. The default library, correctly rounded, is
unchanged.