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

Stacked on #2230; only the top commit (7a5b2a2) 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

Creaa and others added 2 commits November 25, 2026 11:57
…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>
@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.)

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