sleef
sleef copied to clipboard
[GNUABI] Create SVML-like API
Currently, sleefgnuabi
follows... GNU ABI, also used by libmvec
.
Problem
Problems could arise if linking is not done perfectly correctly (presence, in right position, of -lsleefgnuabi
in the linker commands): any incorrect use leads to a silent fallback to libmvec
. Since the ABI is identical, checking symbols is tricky.
Proposed solution
Provide a SVML-like ABI.
By using -ffast-math -ftree-vectorize -mveclibabi=svml
, one can guarantee that sleef
is going to be used as libmvec
does not provide a SVML ABI. If linking is incorrect, it is going to fail. In addition, linking order would matter less as libmvec
-provided symbols and sleefsvmlabi
-provided symbols would be different.
@fpetrogalli Do you have any comment on this?