Skip to content

feat: ungate AVX512 from nightly_simd and set rust-version to 1.89 - #83

Merged
jvdd merged 2 commits into
mainfrom
feat/stable-avx512
Oct 6, 2026
Merged

jvdd merged 2 commits into
mainfrom
feat/stable-avx512

Conversation

@jvdd

@jvdd jvdd commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

AVX-512 target features and intrinsics are stable since Rust 1.89 (stdarch_x86_avx512, rust#138940, tracking issue rust#111137 closed). So the AVX512 code no longer needs the nightly_simd feature.

Changes

  • Removed the nightly_simd gate from all AVX512 code: the avx512 modules in simd_*.rs, the AVX512 struct in config.rs, the runtime dispatch in lib.rs (avx512_supported, from fix: only dispatch 8 and 16-bit data to AVX512 when AVX512BW is available #84) and the AVX512 test cases.
  • The crate-level #![feature(...)] attributes now apply only to 32-bit ARM (stdarch_arm_neon_intrinsics, stdarch_arm_feature_detection, arm_target_feature). Removed cfg_version, stdsimd, stdarch_x86_avx512 and avx512_target_feature; they are not necessary with an MSRV of 1.89.
  • Added rust-version = "1.89" to Cargo.toml.
  • README and crate docs: nightly_simd is only necessary for NEON on 32-bit ARM. NEON on aarch64 is stable since Rust 1.59 and was already not gated.
  • CI:
    • Check_Stable now also checks the default features, on x86_64 and aarch64.
    • New Check_MSRV job: checks all features with the rust-version from Cargo.toml. There is no Cargo.lock, so the job uses CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback.

Side effect: on x86 and aarch64, nightly_simd now has no effect. Thus, the default features build on stable Rust for these targets. On 32-bit ARM, the default features still need nightly, as before (rust#111800 is still open). The nightly_simd feature stays, because dependents enable it (e.g. Polars: simd = ["argminmax/nightly_simd"]).

Checked

  • Native on an i7-1185G7 (AVX512) with stable 1.95: cargo test --features half (the AVX512 implementations run)
  • Intel SDE (Sapphire Rapids, and AVX512F without AVX512BW) with stable 1.95: all tests pass
  • Rust 1.89 with the fallback resolver: cargo check --all-features
  • macOS arm64: cargo test --features half on stable and nightly
  • armv7: nightly with nightly_simd and stable without it build

@codspeed

codspeed Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 168 untouched benchmarks


Comparing feat/stable-avx512 (96a2f93) with main (4464d8e)

Open in CodSpeed

@jvdd
jvdd force-pushed the feat/stable-avx512 branch from bbe421e to dd19fac Compare October 6, 2026 07:45
@jvdd
jvdd changed the base branch from main to fix/avx512bw-dispatch October 6, 2026 07:45
Base automatically changed from fix/avx512bw-dispatch to main October 6, 2026 08:38
@jvdd
jvdd force-pushed the feat/stable-avx512 branch from dd19fac to 96a2f93 Compare October 6, 2026 08:53
@jvdd
jvdd merged commit 681e71c into main Oct 6, 2026
23 checks passed
@jvdd
jvdd deleted the feat/stable-avx512 branch October 6, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant