Skip to content

Commit

Permalink
Make: Explicit control over f16 builds with NEON
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Oct 21, 2024
1 parent 5a56a25 commit 708d034
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ def get_bool_env_w_name(name: str, preference: bool) -> tuple:
macros_args.extend(
[
get_bool_env_w_name("SIMSIMD_TARGET_NEON", True),
get_bool_env_w_name("SIMSIMD_TARGET_NEON_F16", True),
get_bool_env_w_name("SIMSIMD_TARGET_NEON_BF16", True),
get_bool_env_w_name("SIMSIMD_TARGET_SVE", True),
get_bool_env_w_name("SIMSIMD_TARGET_SVE_F16", True),
get_bool_env_w_name("SIMSIMD_TARGET_SVE_BF16", True),
get_bool_env_w_name("SIMSIMD_TARGET_SVE2", True),
get_bool_env_w_name("SIMSIMD_TARGET_HASWELL", True),
get_bool_env_w_name("SIMSIMD_TARGET_SKYLAKE", True),
Expand All @@ -101,6 +105,8 @@ def get_bool_env_w_name(name: str, preference: bool) -> tuple:
macros_args.extend(
[
get_bool_env_w_name("SIMSIMD_TARGET_NEON", True),
get_bool_env_w_name("SIMSIMD_TARGET_NEON_F16", True), # Supported on Apple M1 and newer
get_bool_env_w_name("SIMSIMD_TARGET_NEON_BF16", True), # Supported on Apple M2 and newer
get_bool_env_w_name("SIMSIMD_TARGET_SVE", False),
get_bool_env_w_name("SIMSIMD_TARGET_SVE2", False),
get_bool_env_w_name("SIMSIMD_TARGET_HASWELL", True),
Expand All @@ -124,9 +130,11 @@ def get_bool_env_w_name(name: str, preference: bool) -> tuple:
compile_args.append("/d2FH4-")

# We can't SIMD all the way on Windows :(
# Even NEON `f16` fails: https://github.com/ashvardanian/SimSIMD/actions/runs/11419164624/job/31773473319?pr=214
macros_args.extend(
[
get_bool_env_w_name("SIMSIMD_TARGET_NEON", True),
get_bool_env_w_name("SIMSIMD_TARGET_NEON_F16", False),
get_bool_env_w_name("SIMSIMD_TARGET_NEON_BF16", False),
get_bool_env_w_name("SIMSIMD_TARGET_SVE", False),
get_bool_env_w_name("SIMSIMD_TARGET_SVE2", False),
Expand Down

0 comments on commit 708d034

Please sign in to comment.