Skip to content

Commit 6ca7efd

Browse files
committed
v2 arm: rustfmt the test-module gate; blackboard entry
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
1 parent b7a6ee4 commit 6ca7efd

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

‎.claude/blackboard.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 2026-10-10 — x86-64-v2 realization (SSE4.2 without AVX) via the scalar backend
2+
3+
- **What:** an eighth realization, selected at compile time by `all(target_arch = "x86_64", target_feature = "sse4.2", not(target_feature = "avx"))`. You get it with `target-cpu=native` on a v2-only CPU (Nehalem/Westmere, Silvermont-class Atom, VMs that hide AVX) or with `.cargo/config-v2.toml`. `simd.rs` routes this arm to `simd_scalar.rs`: the AVX2/AVX-512 types wrap 256/512-bit registers and cannot be the v2 realization, so plain arrays that LLVM compiles to SSE are used instead. Baseline x86-64 builds (no SSE4.2) are unchanged: they keep the AVX2 arm and the `cpu_guard` AVX2 floor, which now exempts `sse4.2 && !avx2` (the AVX and v2 arms together).
4+
- **API gap closed in `simd_scalar.rs`:** `F32Mask16::to_bitmask` and `F32x16::gather` (unsafe, same contract as the AVX2 polyfill). sentinel-qa: `gather` CONDITIONAL, satisfied by the SAFETY comment added at the one call site in `hpc/cam_pq.rs`; `to_bitmask` PARITY-OK.
5+
- **Evidence:**
6+
- `scripts/masking-parity.sh v2-qemu` passes all 15 groups under `qemu-x86_64-static -cpu Nehalem`. The objdump witness finds no `%ymm`, `%zmm`, mask register, or VEX op on xmm. Disable run: with the `simd.rs` routing reverted, the binary SIGILLs under Nehalem.
7+
- Per-test sweep of all 2541 v2 lib tests, each as its own process under Nehalem: 28 SIGILLs, all in `simd_avx2`'s own test modules (`tests`, `u8x32_tests`, `f16_precision_tests`), which call AVX2 intrinsics directly. No library path faulted. Those modules are gated off v2 (36 tests). Full v2 suite afterwards: 2474 passed, 0 failed, 31 ignored.
8+
- Clippy `-D warnings` clean on v2, v3, v4, avx and baseline. Codegen witness avx2/avx512 PASS. fmt clean.
9+
- New CI row `realization/v2` runs the parity arm, the objdump witness and the SIMD unit tests under Nehalem.
10+
- **Open:** `crate::simd_avx2` stays public on v2 builds and nothing checks for AVX2 at startup there, so a direct caller SIGILLs. Documented in the `simd.rs` module doc; the safe path is the `crate::simd` re-exports.
11+
112
## 2026-10-10 — `tests/splat3d_correctness.rs`: clippy 1.99 clean under `--features splat3d`
213

314
- Five lints, all in the test file: an unneeded `mut` on a closure, an over-precise f32 literal (`0.28209479177387814` → `0.282_094_8`; same bits, `0x3e906ebb`), and three `chunks_exact(3)` → `as_chunks::<3>().0.iter()`.

‎src/simd_avx2.rs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3250,7 +3250,11 @@ impl Default for U8x32 {
32503250

32513251
// Off the x86-64-v2 arm: these call AVX2 intrinsics directly, and a v2 build
32523252
// (SSE4.2, no AVX) routes `crate::simd` to the scalar realization instead.
3253-
#[cfg(all(test, target_arch = "x86_64", not(all(target_feature = "sse4.2", not(target_feature = "avx")))))]
3253+
#[cfg(all(
3254+
test,
3255+
target_arch = "x86_64",
3256+
not(all(target_feature = "sse4.2", not(target_feature = "avx")))
3257+
))]
32543258
mod u8x32_tests {
32553259
use super::U8x32;
32563260

0 commit comments

Comments
 (0)