Skip to content

Commit a08bd40

Browse files
committed
masking-parity: the same wrong fallback claim, at its source
CodeRabbit on #314. `scripts/masking-parity.sh:26-30` carried the identical claim this PR already corrected in CLAUDE.md: that a set RUSTFLAGS makes the arm "measure v3 while claiming v4". Sharper than a duplicate: CLAUDE.md's correction CITES this script as the place the trap is documented, so the doc was fixed while the source it points at still taught the wrong number. An exhaustive grep confirms these were the only two instances outside the blackboard's historical record. The correction, with this session's own measurement: RUSTFLAGS replaces EVERY config rustflags entry, including the DEFAULT config's own `-Ctarget-cpu`, so no target-cpu reaches rustc and the build lands on the generic `x86-64` baseline (SSE2) — BELOW v3, and the tier `simd_avx2.rs`'s intrinsics SIGILL on. Measured: `RUSTFLAGS="-D warnings"` emitted ZERO `-Ctarget-cpu` flags against 65 with the env unset. Also states what the arm now IS, since the default flip: it names no tier and builds whatever config wins, by default `target-cpu=native`. Read the program's own `avx512f=` header for the tier, or pin config-v3 for AVX2. Verified the script still runs both ways: bash scripts/masking-parity.sh native PASS, avx512f=true CARGO_ARGS='--config .cargo/config-v3.toml' ... native PASS, avx512f=false Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
1 parent 95db84e commit a08bd40

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

‎scripts/masking-parity.sh‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,21 @@ case "$ARM" in
2626
# `env -u RUSTFLAGS`: a workflow-global RUSTFLAGS (CI sets "-D warnings")
2727
# REPLACES every cargo-config rustflags entry, so a `--config
2828
# .cargo/config-v4.toml` passed through CARGO_ARGS would silently lose its
29-
# `-Ctarget-cpu=x86-64-v4` and this arm would measure v3 while claiming
30-
# v4 — the exact trap the tier4 CI job hit. Clearing it lets the config win.
29+
# `-Ctarget-cpu=x86-64-v4` — the exact trap the tier4 CI job hit. Clearing
30+
# it lets the config win.
31+
#
32+
# What you get INSTEAD is not v3 (corrected 2026-09-16, coderabbit on #314;
33+
# this comment said "would measure v3"). RUSTFLAGS replaces EVERY entry,
34+
# including the DEFAULT `.cargo/config.toml`'s own `-Ctarget-cpu`, so no
35+
# target-cpu reaches rustc at all and the build lands on rustc's generic
36+
# `x86-64` baseline — SSE2, BELOW v3, and the tier `simd_avx2.rs`'s
37+
# intrinsics SIGILL on. Measured on one unit: `RUSTFLAGS="-D warnings"`
38+
# emitted ZERO `-Ctarget-cpu` flags against 65 with the env unset.
39+
#
40+
# This arm NAMES NO TIER by design: it builds with whatever config wins,
41+
# which by default is `target-cpu=native` (the host). Read the program's
42+
# own `avx512f=` header line for the tier; pin `.cargo/config-v3.toml`
43+
# through CARGO_ARGS when you specifically want AVX2.
3144
env -u RUSTFLAGS cargo ${CARGO_ARGS:-} build --release --manifest-path "$MANIFEST" --bin simd-masking-parity
3245
"$TD/release/simd-masking-parity"
3346
;;

0 commit comments

Comments
 (0)