mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-22 11:26:34 +00:00
fix(simd): remove outdated nightly-only comment; add AVX-512 CI compile check (#494)
AVX-512 intrinsics (_mm512_*, _mm512_reduce_add_ps, _mm512_abs_ps) are
stable since Rust 1.72. The comment saying "requires nightly Rust" was
misleading — callers would skip the feature unnecessarily.
CI: add a compile-check build step with --features simd-avx512 on the
stable toolchain so regressions are caught. Runtime dispatch is already
in place (is_x86_feature_detected!("avx512f")); the build step verifies
the code at least compiles on runners that may lack AVX-512 hardware.
Closes #47
Co-authored-by: ruvnet <ruvnet@gmail.com>
This commit is contained in:
parent
5ba2b59b5e
commit
e3b3dc67fa
2 changed files with 6 additions and 3 deletions
4
.github/workflows/ruvector-postgres-ci.yml
vendored
4
.github/workflows/ruvector-postgres-ci.yml
vendored
|
|
@ -229,6 +229,10 @@ jobs:
|
|||
run: cargo build --features pg17,index-all,quant-all,graph-complete --release
|
||||
working-directory: crates/ruvector-postgres
|
||||
|
||||
- name: Build with AVX-512 feature (compile-check on stable Rust)
|
||||
run: cargo build --features pg17,simd-avx512 --release
|
||||
working-directory: crates/ruvector-postgres
|
||||
|
||||
- name: Test with all features
|
||||
run: cargo pgrx test pg17 --features index-all,quant-all,graph-complete
|
||||
working-directory: crates/ruvector-postgres
|
||||
|
|
|
|||
|
|
@ -22,9 +22,8 @@ use simsimd::SpatialSimilarity;
|
|||
// SIMD Feature Detection
|
||||
// ============================================================================
|
||||
|
||||
/// Check if AVX-512F is available at runtime
|
||||
/// Note: AVX-512 intrinsics require nightly Rust, so this returns false on stable builds
|
||||
/// To enable AVX-512, compile with --features simd-avx512 on nightly Rust
|
||||
/// Check if AVX-512F is available at runtime.
|
||||
/// Requires compiling with `--features simd-avx512` (stable Rust 1.72+).
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
#[inline]
|
||||
pub fn is_avx512_available() -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue