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

Open
Creaa wants to merge 2 commits from upstream-pr/2235 into main
Creaa commented 2026-11-25 10:56:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Creaa on 2026-11-25T10:56:48Z.


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 #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

  • Windows 11 build 26300, Python 3.14.2.
  • python -m unittest discover -s scripts -p "test_pr_check.py": 16 tests, OK. With pr_check.py from #2230's head the GPU test and the extended field test fail; without the case/whitespace step only the GPU test fails.

Regression run

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

Not tested

  • #2232's other points, left for follow-ups: driver:, cpu:, windows: and build: lines in the block (needs smoke.ps1), comparing driver and build, and an explicit way to mark an intended GPU mismatch. PR_SMOKE_FIELDS from #2219 is not on main yet; whichever lands second adds gpu to it.
  • Open PRs whose blocks were written by hand without a gpu: line would now be asked for it; blocks from smoke.ps1 have it.

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

<!-- greyfinch-sync:ivall/xcl:issue:5489971806 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2235). Originally posted by [Creaa](https://github.com/Creaa) on 2026-11-25T10:56:48Z. --- 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 #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** - Windows 11 build 26300, Python 3.14.2. - `python -m unittest discover -s scripts -p "test_pr_check.py"`: 16 tests, OK. With `pr_check.py` from #2230's head the GPU test and the extended field test fail; without the case/whitespace step only the GPU test fails. **Regression run** - None: only `scripts/` changes, not the runtime. **Not tested** - #2232's other points, left for follow-ups: `driver:`, `cpu:`, `windows:` and `build:` lines in the block (needs `smoke.ps1`), comparing driver and build, and an explicit way to mark an intended GPU mismatch. `PR_SMOKE_FIELDS` from #2219 is not on main yet; whichever lands second adds `gpu` to it. - Open PRs whose blocks were written by hand without a `gpu:` line would now be asked for it; blocks from `smoke.ps1` have it. **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](https://claude.com/claude-code)
raylitebull commented 2026-11-25 11:09:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T11:03:13Z.


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.)
<!-- greyfinch-sync:ivall/xcl:comment:7160524054 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2235#issuecomment-7160524054). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T11:03:13Z. --- 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.)
RavenCurseBurg commented 2026-11-25 14:10:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T14:05:44Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7164748718 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2235#issuecomment-7164748718). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T14:05:44Z. --- 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.
DavidM1911 commented 2026-11-25 17:07:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T16:41:58Z.


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

<!-- greyfinch-sync:ivall/xcl:comment:7168394740 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2235#issuecomment-7168394740). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T16:41:58Z. --- 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 commented 2026-11-25 17:07:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Creaa on 2026-11-25T16:46:26Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7168509799 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2235#issuecomment-7168509799). Originally posted by [Creaa](https://github.com/Creaa) on 2026-11-25T16:46:26Z. --- 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.
github-actions[bot] commented 2026-11-29 07:43:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:43:50Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7252654351 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2235#issuecomment-7252654351). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:43:50Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 07:38:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:38:57Z.


Triage (#1607) – head 5d1b0a0

This PR is stacked on #2230: its first commit a156f8b is #2230. Only 5d1b0a0 belongs here, and the shared lines are not a duplicate. #2351 (same issue #2232) makes smoke.ps1 record the driver and build and is complementary. On main smoke.ps1 already writes a gpu: line.
A small issue in check: when the PR block has no gpu: line but the main blocks do, m is None and the message is "not of the same title for the same time". The missing gpu line is also reported, so this is only a misleading second message.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304313517 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2235#issuecomment-7304313517). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:38:57Z. --- **Triage (#1607)** – head 5d1b0a0 This PR is stacked on #2230: its first commit a156f8b is #2230. Only 5d1b0a0 belongs here, and the shared lines are not a duplicate. #2351 (same issue #2232) makes `smoke.ps1` record the driver and build and is complementary. On main `smoke.ps1` already writes a `gpu:` line. A small issue in `check`: when the PR block has no `gpu:` line but the main blocks do, `m` is None and the message is "not of the same title for the same time". The missing `gpu` line is also reported, so this is only a misleading second message. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2235:upstream-pr/2235'
git switch 'upstream-pr/2235'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2235'
git switch 'upstream-pr/2235'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2235'
git switch 'upstream-pr/2235'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2235'
git switch 'main'
git merge --squash 'upstream-pr/2235'
git switch 'main'
git merge --ff-only 'upstream-pr/2235'
git switch 'main'
git merge 'upstream-pr/2235'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
xcl-dev/xcl!2225
No description provided.