Closed grubdragon closed 1 year ago
Hey, @grubdragon! Thanks for reaching out!
We have encountered that issue internally as well and will try to patch it in the next two days.
For compatibility purposes, you may want to disable the USEARCH_USE_NATIVE_F16
in generic builds, unless you know precisely, that the hardware supports it. This, however, will not necessarily compromise the performance.
If you keep SimSIMD enabled, on Linux targets, we will dispatch AVX-512 (for x86) and NEON/SVE (for Arm), when supported by the platforms. Those ISA extensions will bring the f16
support where it matters - in distance calculations. To ensure that the right implementation is always pre-compiled and needs no JIT-ing, we have added annotations for GCC, our default compiler on Linux. The patch will be merged into the main
branch of SimSIMD, and then USearch as soon as it passes the CI. Sadly, some platforms, like MacOS, with their "Universal Builds", confuse my macros.
If you have any suggestions, feel free to contribute, @grubdragon 🤗
@grubdragon, I'm curious if our last releases resolved the issue. Please let me know if it still requires addressing.
Describe the bug
While working on the lanterndb project, we discovered a bug that made compilation fail. Compilation failed for my machine since it had
__AVX512F__
defined, but environment did not support_Float16
. See code below: https://github.com/unum-cloud/usearch/blob/b7ec32c0bdd7ba496c6d7bbef209c889fb4bb1f6/include/usearch/index_plugins.hpp#L23-L35There is another underlying issue in the else condition of the same code, since the code throws away the environment's choice, even if
USEARCH_USE_NATIVE_F16
is pre-defined,A better choice is to
__AVX512__
is defined, we check if_Float16
is defined.We have filed the bug internally here: https://github.com/lanterndata/lanterndb/issues/59
Attempted to solve it here: https://github.com/Ngalstyan4/usearch/pull/6
Steps to reproduce
make install
step, I hit the error message at 7%:error: _Float16 does not name a type
Expected behavior
Build should be successful and continue to 100%
USearch version
v0.22.1
Operating System
Ubuntu 22.04
Hardware architecture
x86
Which interface are you using?
C++ implementation
Contact Details
No response
Is there an existing issue for this?
Code of Conduct