ashvardanian / SimSIMD

Up to 200x Faster Dot Products & Similarity Metrics — for Python, Rust, C, JS, and Swift, supporting f64, f32, f16 real & complex, i8, and bit vectors using SIMD for both AVX2, AVX-512, NEON, SVE, & SVE2 📐
https://ashvardanian.com/posts/simsimd-faster-scipy/
Apache License 2.0
988 stars 59 forks source link

Bug: Compilation warnings #224

Closed Spixmaster closed 2 weeks ago

Spixmaster commented 2 weeks ago

Describe the bug

Warnings happen while compiling which seem to be important.

==> Starting build()...
-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /home/matheus/aur/simsimd/src/SimSIMD-5.9.10/build
[ 50%] Building C object CMakeFiles/simsimd_shared.dir/c/lib.c.o
In file included from /home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/simsimd.h:108,
                 from /home/matheus/aur/simsimd/src/SimSIMD-5.9.10/c/lib.c:48:
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_scale_f16_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1503:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1503 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_wsum_f16_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1543:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1543 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1544:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1544 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_fma_f16_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1571:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1571 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1572:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1572 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_scale_u8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1622:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1622 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_wsum_u8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1673:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1673 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1674:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1674 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_scale_i8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1742:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1742 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_wsum_i8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1794:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1794 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1795:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1795 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_fma_i8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1839:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1839 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1840:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1840 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_fma_u8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1892:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1892 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1893:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1893 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
At top level:
cc1: note: unrecognized command-line option '-Wno-tautological-constant-compare' may have been intended to silence earlier diagnostics
[100%] Linking C shared library libsimsimd.so
[100%] Built target simsimd_shared
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/matheus/aur/simsimd/src/SimSIMD-5.9.10/build
[ 14%] Building C object CMakeFiles/simsimd_test_compile_time.dir/scripts/test.c.o
[ 28%] Linking C executable simsimd_test_compile_time
[ 28%] Built target simsimd_test_compile_time
[ 42%] Building C object CMakeFiles/simsimd_test_run_time.dir/scripts/test.c.o
[ 57%] Building C object CMakeFiles/simsimd_test_run_time.dir/c/lib.c.o
In file included from /home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/simsimd.h:108,
                 from /home/matheus/aur/simsimd/src/SimSIMD-5.9.10/c/lib.c:48:
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_scale_f16_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1503:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1503 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_wsum_f16_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1543:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1543 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1544:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1544 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_fma_f16_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1571:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1571 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1572:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1572 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_scale_u8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1622:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1622 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_wsum_u8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1673:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1673 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1674:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1674 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_scale_i8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1742:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1742 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_wsum_i8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1794:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1794 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1795:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1795 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_fma_i8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1839:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1839 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1840:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1840 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h: In function 'simsimd_fma_u8_sapphire':
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1892:41: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1892 |     __m512h alpha_vec = _mm512_set1_ph((_Float16)alpha);
      |                                         ^~~~~~~~
/home/matheus/aur/simsimd/src/SimSIMD-5.9.10/include/simsimd/elementwise.h:1893:40: warning: ISO C does not support the '_Float16' type before C23 [-Wpedantic]
 1893 |     __m512h beta_vec = _mm512_set1_ph((_Float16)beta);
      |                                        ^~~~~~~~
At top level:
cc1: note: unrecognized command-line option '-Wno-tautological-constant-compare' may have been intended to silence earlier diagnostics
[ 71%] Linking C executable simsimd_test_run_time
[ 71%] Built target simsimd_test_run_time
[100%] Built target simsimd_shared

Steps to reproduce

Just compile.

Expected behavior

No warnings.

SimSIMD version

v5.9.10

Operating System

Arch Linux

Hardware architecture

x86

Which interface are you using?

C++ bindings

Contact Details

No response

Are you open to being tagged as a contributor?

Is there an existing issue for this?

Code of Conduct

Spixmaster commented 2 weeks ago

Fixed with https://github.com/ashvardanian/SimSIMD/pull/227.