The shared-scratch bench's exact fill counts cannot hold on a 2-4 core CI runner #2741

Open
opened 2026-11-29 16:49:20 +00:00 by github-bot · 3 comments
Owner

@⁠sh3nw4ld on GitHub · 2026-11-29 16:46 UTC · original

Summary

The CI's Tests step (running for the first time now that Actions are on) fails on a 2-core/4-core GitHub runner in host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_end — a bench that asserts exact internal counts:

assertion `left == right` failed: expected 2 GPU fills per round
  left: 12
 right: 16

A second thread of the same test also hit card_steps.rs:2886. Locally on an RTX 4060 Ti — both on hardware and with VICTORY_D3D12_WARP=1 — the test passes every time; the counts only move on the runner's constrained cores, where the bench's own threads (and its two child-process runs) cannot keep the flight timing the counts assume.

What it is

The bench drives VICTORY_SCRATCH_SHARED off and on through child processes (Command::new(current_exe) with the env set) and asserts the fills/refusals/WHY_READ waits per mode. With shared scratch on, every round must produce exactly 2 GPU fills and 0 refusals; on the runner, 4 of the 16 expected fills were elided — the shared-scratch path coalesced more than the round model expects when the CPU lags the card.

Reproduction

Not reproducible on desktop hardware (passes on RTX 4060 Ti hardware and WARP, 10+ runs). It reproduces on GitHub's windows-latest runner — run any PR's CI, or main's own run once a push lands there.

Options, for the maintainers to judge

  1. Skip on constrained hosts: the bench already prints [RTX bench ...]; a guard on available_parallelism() (or an explicit VICTORY_BENCH_REQUIRE_CORES switch) would keep it off the small runners.
  2. Relax the count to a range, if the exact 2-per-round model is a property of fast machines only.
  3. Keep as is and accept the runner red until a beefier runner — then the CI badge lies about the code, not the test.

My own CI-green PR (#2682) carries everything else main's first CI run surfaced (both clippy passes, the diagnostics build, the bcpack oracle parity, the policy entry, the card_steps learned-pages race and the shader tests' clean skips on a no-SM-6.6 host); this bench is the one piece left, and it is the maintainers' judgment call, not mine to make.

**@⁠sh3nw4ld** on GitHub · 2026-11-29 16:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2741) ## Summary The CI's Tests step (running for the first time now that Actions are on) fails on a 2-core/4-core GitHub runner in `host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_end` — a bench that asserts exact internal counts: ``` assertion `left == right` failed: expected 2 GPU fills per round left: 12 right: 16 ``` A second thread of the same test also hit card_steps.rs:2886. Locally on an RTX 4060 Ti — both on hardware and with `VICTORY_D3D12_WARP=1` — the test passes every time; the counts only move on the runner's constrained cores, where the bench's own threads (and its two child-process runs) cannot keep the flight timing the counts assume. ## What it is The bench drives `VICTORY_SCRATCH_SHARED` off and on through child processes (`Command::new(current_exe)` with the env set) and asserts the fills/refusals/`WHY_READ` waits per mode. With shared scratch on, every round must produce exactly 2 GPU fills and 0 refusals; on the runner, 4 of the 16 expected fills were elided — the shared-scratch path coalesced more than the round model expects when the CPU lags the card. ## Reproduction Not reproducible on desktop hardware (passes on RTX 4060 Ti hardware and WARP, 10+ runs). It reproduces on GitHub's `windows-latest` runner — run any PR's CI, or main's own run once a push lands there. ## Options, for the maintainers to judge 1. **Skip on constrained hosts**: the bench already prints `[RTX bench ...]`; a guard on `available_parallelism()` (or an explicit `VICTORY_BENCH_REQUIRE_CORES` switch) would keep it off the small runners. 2. **Relax the count** to a range, if the exact 2-per-round model is a property of fast machines only. 3. **Keep as is** and accept the runner red until a beefier runner — then the CI badge lies about the code, not the test. My own CI-green PR (#2682) carries everything else main's first CI run surfaced (both clippy passes, the diagnostics build, the bcpack oracle parity, the policy entry, the card_steps learned-pages race and the shader tests' clean skips on a no-SM-6.6 host); this bench is the one piece left, and it is the maintainers' judgment call, not mine to make.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 16:49:20 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-29 16:46 UTC · original

Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

**@⁠github-actions[bot]** on GitHub · 2026-11-29 16:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2741#issuecomment-7259166889) Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
Author
Owner

@⁠sh3nw4ld on GitHub · 2026-11-29 16:59 UTC · original

The class is wider than the bench: three more wave tests failed on the same runner in the following CI runs, each once and only there (desktop hardware runs them green, repeatedly):

  • xmem::tests::a_read_by_range_waits_only_for_a_remapping_that_meets_it (xmem.rs:4958) — the refused-counter assert: a read that had to wait for the remapping did not wait, twice in two different PRs' runs (they carry no xmem changes at all).
  • host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_end — the bench of the original report, in every run since.
  • Two already fixed in my CI-green PR (#2682): the card_steps learned-pages race and the xasync terminate-from-own-callback read race.

The pattern holds: the wave tests assume the machine keeps up with their threads. The runner cannot. Same three options as above, and note the flip side visible in the runs: the same tests pass on most runs and fail on some — flaky, not broken.

**@⁠sh3nw4ld** on GitHub · 2026-11-29 16:59 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2741#issuecomment-7259331108) The class is wider than the bench: three more wave tests failed on the same runner in the following CI runs, each once and only there (desktop hardware runs them green, repeatedly): - `xmem::tests::a_read_by_range_waits_only_for_a_remapping_that_meets_it` (xmem.rs:4958) — the refused-counter assert: a read that had to wait for the remapping did not wait, twice in two different PRs' runs (they carry no xmem changes at all). - `host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_end` — the bench of the original report, in every run since. - Two already fixed in my CI-green PR (#2682): the card_steps learned-pages race and the xasync terminate-from-own-callback read race. The pattern holds: the wave tests assume the machine keeps up with their threads. The runner cannot. Same three options as above, and note the flip side visible in the runs: the same tests pass on most runs and fail on some — flaky, not broken.
Author
Owner

@⁠Tan7rex on GitHub · 2026-12-01 15:14 UTC · original

It does reproduce on desktop hardware, in a full parallel run. Windows 11 Pro (build 26100), RTX 4090, main 5fabb46e, release test binary of victory-gpu --lib:

  • whole library suite, default threads: shared_scratch_eliminates_flight_settle_end_to_end failed 14 of 60 runs (15 of 60 with #3902 applied)
  • the test alone (--exact): 0 of 20

The failure here is the upload mode's count: expected 1 refusal per round with VICTORY_SCRATCH_SHARED=0, with rounds=8 ... refused=7. Reading Host::card_steps, a refusal (DONE[3]) is counted only when line().blocking() is non-empty, that is, while the previous round's flight is still on the card. When the test's thread is slowed by the other tests (or by a small runner's cores), the card finishes first, nothing blocks, and that round counts no refusal. So the exact counts hold only while the CPU keeps ahead of the card. That's a reading of the code, not something I instrumented.

That supports option 2 (assert a range: at least one refusal, at most one per round, with shared scratch on still 0), or option 1. I'll leave the choice to the maintainer, as the issue says.

**@⁠Tan7rex** on GitHub · 2026-12-01 15:14 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2741#issuecomment-7315573596) It does reproduce on desktop hardware, in a full parallel run. Windows 11 Pro (build 26100), RTX 4090, `main` 5fabb46e, release test binary of `victory-gpu --lib`: - whole library suite, default threads: `shared_scratch_eliminates_flight_settle_end_to_end` failed **14 of 60** runs (15 of 60 with #3902 applied) - the test alone (`--exact`): **0 of 20** The failure here is the upload mode's count: `expected 1 refusal per round with VICTORY_SCRATCH_SHARED=0`, with `rounds=8 ... refused=7`. Reading `Host::card_steps`, a refusal (`DONE[3]`) is counted only when `line().blocking()` is non-empty, that is, while the previous round's flight is still on the card. When the test's thread is slowed by the other tests (or by a small runner's cores), the card finishes first, nothing blocks, and that round counts no refusal. So the exact counts hold only while the CPU keeps ahead of the card. That's a reading of the code, not something I instrumented. That supports option 2 (assert a range: at least one refusal, at most one per round, with shared scratch on still 0), or option 1. I'll leave the choice to the maintainer, as the issue says.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA#2741
No description provided.