Skip to content

Commit

Permalink
Fix: Disable AVX-512 for Windows and MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Sep 2, 2023
1 parent aa77e12 commit bd09002
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
*/
#define SIMSIMD_TARGET_ARM_NEON 1
#define SIMSIMD_TARGET_X86_AVX2 1
#define SIMSIMD_TARGET_X86_AVX512 1
#if __linux__
#define SIMSIMD_TARGET_ARM_SVE 1
#define SIMSIMD_TARGET_X86_AVX512 1
#endif

#include "simsimd/simsimd.h"
Expand Down
5 changes: 4 additions & 1 deletion python/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ def test_non_null():
assert simd.to_int(simd.hamming_b1x128_sve) != 0
assert simd.to_int(simd.tanimoto_maccs_sve) != 0

# x86 AVX2 and AVX-512 variants are precompiled for every 64-bit x86 platform:
# x86 AVX2 variants are precompiled for every 64-bit x86 platform:
if platform.machine() == "x86_64":
assert simd.to_int(simd.cos_f32x4_avx2) != 0

# x86 AVX-512 variants are precompiled for 64-bit x86 machines running Linux:
if platform.machine() == "x86_64" and platform.system().lower() == "linux":
assert simd.to_int(simd.cos_f16x16_avx512) != 0
assert simd.to_int(simd.hamming_b1x128_avx512) != 0
assert simd.to_int(simd.tanimoto_maccs_avx512) != 0

0 comments on commit bd09002

Please sign in to comment.