Skip to content

test(miri): fix the shard failures from the first sharded master run - #413

Merged
AdaWorldAPI merged 3 commits into
masterfrom
claude/gallant-wright-wqeht0
Nov 6, 2026
Merged

AdaWorldAPI merged 3 commits into
masterfrom
claude/gallant-wright-wqeht0

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

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

failures cause fix
simd_avx2::*, simd_amx::*, simd_int_ops::tests::gemm_u8_i8_* AVX intrinsics ("requires unavailable target features: avx") or cpuid inline assembly, which Miri cannot run. These are the same classes the filter already excludes for simd::tests and cpu_guard. Added to the nextest filter, with the rationale written next to it.
simd_nightly::tests::f32x16_round_parity The test compared against f32::round (ties away from zero). Every backend has rounded ties to even since 5f4636e, so 0.5 → 0.0 was correct and the oracle was stale. The oracle now uses round_ties_even.
tests/simd_facade_reexports (3 tests) These tests compare the facade with the hpc homes bit for bit. Miri's default random float error made sigmoid_f32 differ by 3 ulp. MIRIFLAGS=-Zmiri-deterministic-floats in scripts/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} Each one exceeded the 20-minute per-test limit. #[cfg_attr(miri, ignore = ...)], the same treatment as the other long sweeps.

Verification (local)

  • Under Miri: f32x16_round_parity passes, and all 4 tests in simd_facade_reexports pass with deterministic floats. gemm_u8_i8_extreme_values and simd_avx2::tests::test_dot_f64 reproduced the inline-asm and target-feature errors.
  • Native: cargo +nightly test --features nightly-simd f32x16_round passes. cargo test --test u9_domino passes 14/14.
  • cargo fmt --check and sh -n scripts/miri-tests.sh both 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

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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T03:48:49.171650Z 4b40b75 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e9591278-a17d-40c0-b941-d99b687f6cb6
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@AdaWorldAPI
AdaWorldAPI merged commit 9bf9ce5 into master Nov 6, 2026
31 checks passed
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.

2 participants