Repository navigation
test(miri): fix the shard failures from the first sharded master run - #413
Merged
Merged
Conversation
Under Miri each test runs as its own interpreted process, about 30 s minimum each (measured locally: 33-39 s wall for single trivial tests). The ~1400 selected tests take 4-5 hours serial; the 2026-11-05 master run was cancelled at the 2-hour job cap after 590 tests. The job now runs as an eight-way matrix, each shard passing --partition count:K/8 to nextest via MIRI_PARTITION. The script runs the full suite when the variable is unset. Coverage is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMQJzQD5KvNm8BtbsWG
The 2026-11-06 sharded run (42148487191) finished every shard in time but each one failed. Four causes, none a new UB finding: - simd_avx2, simd_amx and simd_int_ops' u8 x i8 GEMM call AVX intrinsics or cpuid, which Miri cannot run (same classes the filter already excludes for simd::tests and cpu_guard). Added to the filter. - simd_nightly f32x16_round_parity compared against f32::round (ties away from zero) although every backend rounds ties to even since 5f4636e. The oracle now uses round_ties_even. - tests/simd_facade_reexports compares the facade and the hpc homes bit for bit; Miri's default random float error made sigmoid_f32 differ by 3 ulp. The script now sets -Zmiri-deterministic-floats. - Three u9_domino randomized tests ran past the 20-minute per-test limit; they carry cfg_attr(miri, ignore) like the other long sweeps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMQJzQD5KvNm8BtbsWG
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The first sharded master run (42148487191, after #412) finished every shard within the cap, taking 16–35 minutes per shard. All eight shards still failed. Before the sharding, these tests never ran, because the single run was cancelled at 590 tests. None of the failures is a new UB finding.
Causes and fixes
simd_avx2::*,simd_amx::*,simd_int_ops::tests::gemm_u8_i8_*cpuidinline assembly, which Miri cannot run. These are the same classes the filter already excludes forsimd::testsandcpu_guard.simd_nightly::tests::f32x16_round_parityf32::round(ties away from zero). Every backend has rounded ties to even since 5f4636e, so0.5 → 0.0was correct and the oracle was stale.round_ties_even.tests/simd_facade_reexports(3 tests)sigmoid_f32differ by 3 ulp.MIRIFLAGS=-Zmiri-deterministic-floatsinscripts/miri-tests.sh.u9_domino::{random_adds_match_the_oracle_in_any_order, product_sums_match_native_and_d, abacus_random_sequences_match_64_u128_counters}#[cfg_attr(miri, ignore = ...)], the same treatment as the other long sweeps.Verification (local)
f32x16_round_paritypasses, and all 4 tests insimd_facade_reexportspass with deterministic floats.gemm_u8_i8_extreme_valuesandsimd_avx2::tests::test_dot_f64reproduced the inline-asm and target-feature errors.cargo +nightly test --features nightly-simd f32x16_roundpasses.cargo test --test u9_dominopasses 14/14.cargo fmt --checkandsh -n scripts/miri-tests.shboth pass.The sharded miri job itself only runs on push to master, so the post-merge run is the real check.
Generated by Claude Code