Skip to content

Scripts: pr_check compares smoke runs only on the same GPU (#2232) - #2235

Open
Creaa wants to merge 2 commits into
xcl-dev:mainfrom
Creaa:scripts/pr-check-same-gpu
Open

Creaa wants to merge 2 commits into
xcl-dev:mainfrom
Creaa:scripts/pr-check-same-gpu

Conversation

@Creaa

@Creaa Creaa commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #2230; only the top commit (5d1b0a0) belongs here.

pr_check.py matched the PR's xcl-smoke block with a main block on title and seconds only. The gpu: line was neither required nor compared, so a PR run on one GPU could be held against main on another, and the 80 % frames and 125 % peak-commit limits then compare two machines. Fixes the GPU part of #2232; recording the driver and debug/release in the block needs smoke.ps1 to write them and is left for a follow-up.

What is in it

  • scripts/pr_check.py: gpu joins SMOKE_FIELDS (a block without it is incomplete, as without title); the baseline is a main block with the PR's title, time and GPU (compared without case and extra whitespace, as PR checks: the smoke comparison accepts two runs from different GPUs, drivers or build profiles #2232 suggests); when main blocks of that title and time exist only on other GPUs, the check says "the main and PR regression runs are not on the same GPU (… against …): run both on one machine". smoke.ps1 already writes gpu:, so blocks it made are unaffected.
  • scripts/test_pr_check.py: test_runs_on_different_gpus_are_not_compared (main only on another GPU is refused even when the PR's numbers would pass against it; with main blocks on both GPUs the one on the PR's GPU is used; the same name in other case or spacing matches; a block without gpu: is incomplete); the existing fixtures get a gpu: line and test_blocks_with_only_commit_lines_fail checks for it too.

Tested

Regression run

  • None: only scripts/ changes, not the runtime.

Not tested

AI use

  • Claude Code (Claude Opus 5.5) wrote the change and the tests, ran them, and drafted this description; I checked it.

🤖 Generated with Claude Code

@raylitebull

Copy link
Copy Markdown
Member

Code review on 7a5b2a2 (scripts/pr_check.py, scripts/test_pr_check.py):

  • Adding "gpu" to SMOKE_FIELDS and normalizing gpu_name (casefold() + collapsed whitespace) in same_run cleanly ensures pr_check.py never compares frames shown or peak commit across mismatched GPUs, while preserving #2230's main_baseline distance ordering.
  • Diff audited and CI workflow approved (45600104173). (Note: if #2230 merges first, this PR will need a quick rebase to drop the shared #2230 hunks.)

Creaa and others added 2 commits November 25, 2026 14:53
…line (xcl-dev#2226)

The PR's own smoke block already had to be free of "(uncommitted changes)",
but a main block with local changes counted as main. When several main blocks
had the PR's title and time, the first pasted one was the baseline, so an
older, more favourable run could be put first.

- A main block whose commit line says "(uncommitted changes)" is not a
  baseline; when it is the only one, the check says to rerun on a clean main.
- With the commit distance known (`main_behind`: git rev-list locally,
  compare/...main ahead_by on GitHub), the baseline is the matching block of
  the newest main commit; without it, the first block as before.
- How many commits behind main each main block is gets printed, not judged:
  the cut-off for an old baseline is the maintainer's call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
)

The PR's smoke block was matched with a main block on title and time only;
the gpu line was neither required nor compared, so a PR run on one GPU could
be held against main on another and the 80 % frames and 125 % commit limits
said nothing. smoke.ps1 already writes the gpu line, so blocks it made pass
as before.

- `gpu` joins the lines a block must have.
- The baseline is a main block with the PR's title, time and GPU (case and
  runs of whitespace do not count); when main blocks of that title and time
  exist only on other GPUs the check says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Creaa
Creaa force-pushed the scripts/pr-check-same-gpu branch from 7a5b2a2 to 5d1b0a0 Compare November 25, 2026 13:53
@RavenCurseBurg

RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown

Verified 5d1b0a0fa7a9b86cbeba9ccafe8ec2aa08023296 via python -B scripts/pr_check.py --local --body <body> --files <files> --head <sha> from a temporary Git repo with two main commits one commit apart. I varied the adapter name, frames and block order in synthetic input. All six CLI cases matched expectations.

  • A newer RTX 4060 Ti block and an older RTX 4060 block selected the older matching GPU in both paste orders. Mixed case, extra spaces and a tab in its name still matched.
  • When only the older matching GPU had 200 frames, the checker failed 110 against 200 and reported that the baseline was one commit behind. When both GPUs matched, the newer 200-frame baseline was selected.
  • A Ti-only baseline produced the GPU mismatch diagnostic. A baseline with an empty adapter produced the missing-gpu diagnostic.

python -B -m unittest discover -s scripts -p test_pr_check.py passed all 16 tests on Windows 11 26100.9711, i7-13700, RTX 4060, Python 3.14.3. No physical adapter comparisons, retail runs or Rust suite. OpenAI Codex (GPT-6) ran the fixtures and wrote this report.

@throny throny added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 25, 2026
@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: 2 real failures, deterministic (also fail --test-threads=1):
gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator
  assertion failed — left: 68, right: 1 (pso.rs:1360)
hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa
  assertion failed: format 85 kept — left: 28, right: 85 (device_x.rs:1376)

Same pair of failures across this batch of PRs — looks like a shared feature area with two broken assertions. Needs fixes before merge.

— Devin

@Creaa

Creaa commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

These two are the main breakage from #2242 (fixed by #2245, merged before this PR was rebased), not this PR: head 5d1b0a0 is on main 06c9f55 and has the fix (pso.rs reads .dxil[67]), and CI passed on it. A local main older than #2245 shows them for every PR in the batch.

AI use: Claude Code (Claude Opus 5.5) checked this and drafted the reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants