PR checks: the 125% peak-commit limit is inside the run-to-run spread; one pair can pass or fail on the same build #2225

Open
opened 2026-11-26 05:23:48 +00:00 by github-bot · 4 comments
Owner

@⁠itsonewi on GitHub · 2026-11-25 10:32 UTC · original

Update 2: Creaa measured eight runs on one build and one machine: the low/high split is a variation inside a run, not the title profile and not the order. One low run in eight started from exactly the same data folder as the high runs. The issue stands as written below: one pair cannot carry a 125% limit. See the comments for the eight numbers.

pr_check.py compares one xcl-smoke block from the PR with one from main and rejects the PR when its peak commit is over 125% of main's (COMMIT_GROWTH, line 35; the comparison is at lines 160-162). One 60 s run is not stable enough for that comparison: the peak commit is bimodal, and the two modes differ by about 1.7x.

The evidence is in #2223, a help-text-only change that cannot affect memory. The author ran the same two revisions twice, in opposite order:

run order main PR result
main first 11,952 MB 19,558 MB PR is 164% of main - fails
PR first 20,977 MB 11,435 MB PR is 55% of main - passes

The low/high split did not follow the order: in the first pair the PR was high, in the second main was high. Same title (RetailTitle), same 60 s, same machine (RTX 4070), same two commits.

Creaa then ran the same release build of main (cbc296a) eight times in a row on the same machine, 60 s, with 62 GB of commit free at every start:

runs peak commit, in order
A: one shared data folder, 4 runs 18,160 - 18,964 - 17,393 - 17,259 MB
B: a fresh copy of the same profile for each run, 4 runs 19,705 - 11,374 - 17,690 - 17,408 MB

B2 started from exactly the same state as B1, B3 and B4 and still came out in the low mode. So the low mode is not the profile and not the order: the title sometimes does not load its graphics set in the first seconds (no AS/mesh burst, no video-memory arenas), and the run never commits the ~6 GB the other runs do. The #2223 logs show the same: the low run made 64 compute pipelines and no mesh pipelines; the high run made 1,569 AS shaders and 14 arenas. Why the title takes that path on a given run is not known.

That is not a criticism of #2223 (a string in HELP cannot allocate 8 GB). It is a measurement problem in the gate:

  • A clean PR can fail because its run happened to be the high mode; the author re-runs until a pair passes.
  • A real memory regression can pass because main's run happened to be the low mode.
  • The block records one number, not a distribution, so neither the author nor the reviewer can tell which case they are looking at.
  • The frames comparison has the same problem: the low mode can show fewer frames, so the 80% check is also a draw.

#2219 makes the peak commit line mandatory, which is right, but it does not make the number reproducible.

Suggested fix

  • Run each side at least 3 times and compare medians, or run both orders and use the higher of the two; smoke.ps1 could take -Repeat N and print N blocks, and pr_check.py could use the median. One pair is not enough.
  • Until then, make the 125% check advisory (print the ratio, do not fail) or raise the threshold above the observed spread; 125% is inside the run-to-run noise.
  • Record the run order, the previous run's peak, and the starting state in the block (or in the artifacts from #1855), so a reviewer can see whether the numbers are comparable.
  • If the low mode is real runtime behaviour (the title sometimes skipping its graphics load), it deserves its own runtime issue; the smoke gate should not be where it is discovered.

Related

  • #2213 / #2219: the PR block must now include peak commit; this issue is about whether the number means anything.
  • #1506 / #1750: main's block may have crashed before its end, and the memory comparison is skipped there.
  • #1566: the title's memory budget is reported but never enforced; the smoke check is the only memory gate today.
  • #1855: keep artifacts for reproducible smoke runs.
  • #717: the block cannot tell a black screen from a working title - another case where one number is not enough.
  • #284: the coherent window is sized from uma_coherent.txt; it was 4095 MB in both #2223 runs, so it is not the cause here.

Scope

Read through the GitHub API at 568e7db; the numbers are from #2223's description and Creaa's runs, not from runs I made. Nothing was cloned, built or run.

**@⁠itsonewi** on GitHub · 2026-11-25 10:32 UTC · [original](https://github.com/xcl-dev/xcl/issues/2225) **Update 2:** Creaa measured eight runs on one build and one machine: the low/high split is a variation inside a run, not the title profile and not the order. One low run in eight started from exactly the same data folder as the high runs. The issue stands as written below: one pair cannot carry a 125% limit. See the comments for the eight numbers. `pr_check.py` compares one `xcl-smoke` block from the PR with one from main and rejects the PR when its `peak commit` is over 125% of main's (`COMMIT_GROWTH`, line 35; the comparison is at lines 160-162). One 60 s run is not stable enough for that comparison: the peak commit is bimodal, and the two modes differ by about 1.7x. The evidence is in #2223, a help-text-only change that cannot affect memory. The author ran the same two revisions twice, in opposite order: | run order | main | PR | result | |---|---|---|---| | main first | 11,952 MB | 19,558 MB | PR is 164% of main - fails | | PR first | 20,977 MB | 11,435 MB | PR is 55% of main - passes | The low/high split did not follow the order: in the first pair the PR was high, in the second main was high. Same title (`RetailTitle`), same 60 s, same machine (RTX 4070), same two commits. Creaa then ran the same release build of main (`cbc296a`) eight times in a row on the same machine, 60 s, with 62 GB of commit free at every start: | runs | peak commit, in order | |---|---| | A: one shared data folder, 4 runs | 18,160 - 18,964 - 17,393 - 17,259 MB | | B: a fresh copy of the same profile for each run, 4 runs | 19,705 - **11,374** - 17,690 - 17,408 MB | B2 started from exactly the same state as B1, B3 and B4 and still came out in the low mode. So the low mode is not the profile and not the order: the title sometimes does not load its graphics set in the first seconds (no AS/mesh burst, no video-memory arenas), and the run never commits the ~6 GB the other runs do. The #2223 logs show the same: the low run made 64 compute pipelines and no mesh pipelines; the high run made 1,569 AS shaders and 14 arenas. Why the title takes that path on a given run is not known. That is not a criticism of #2223 (a string in `HELP` cannot allocate 8 GB). It is a measurement problem in the gate: - A clean PR can fail because its run happened to be the high mode; the author re-runs until a pair passes. - A real memory regression can pass because main's run happened to be the low mode. - The block records one number, not a distribution, so neither the author nor the reviewer can tell which case they are looking at. - The frames comparison has the same problem: the low mode can show fewer frames, so the 80% check is also a draw. #2219 makes the `peak commit` line mandatory, which is right, but it does not make the number reproducible. **Suggested fix** - Run each side at least 3 times and compare medians, or run both orders and use the higher of the two; `smoke.ps1` could take `-Repeat N` and print N blocks, and `pr_check.py` could use the median. One pair is not enough. - Until then, make the 125% check advisory (print the ratio, do not fail) or raise the threshold above the observed spread; 125% is inside the run-to-run noise. - Record the run order, the previous run's peak, and the starting state in the block (or in the artifacts from #1855), so a reviewer can see whether the numbers are comparable. - If the low mode is real runtime behaviour (the title sometimes skipping its graphics load), it deserves its own runtime issue; the smoke gate should not be where it is discovered. **Related** - #2213 / #2219: the PR block must now include `peak commit`; this issue is about whether the number means anything. - #1506 / #1750: main's block may have crashed before its end, and the memory comparison is skipped there. - #1566: the title's memory budget is reported but never enforced; the smoke check is the only memory gate today. - #1855: keep artifacts for reproducible smoke runs. - #717: the block cannot tell a black screen from a working title - another case where one number is not enough. - #284: the coherent window is sized from `uma_coherent.txt`; it was 4095 MB in both #2223 runs, so it is not the cause here. **Scope** Read through the GitHub API at `568e7db`; the numbers are from #2223's description and Creaa's runs, not from runs I made. Nothing was cloned, built or run.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:23:48 +00:00
Author
Owner

@⁠Creaa on GitHub · 2026-11-25 10:41 UTC · original

The two numbers come from the runs sharing one title profile, not from run order as such. I'm taking the smoke-script side of this.

The #2223 pairs ran smoke.ps1 without XCL_DATA_ROOT, so every run used the same %LOCALAPPDATA%\XCL\<title> and started in whatever state the previous run left there (the title's saves and settings, XCL's caches). I have the logs of #2223's second pair on this machine (same RTX 4070, release builds, 60 s):

run coherent window commit at 8 s → 14 s between 6 and 15 s the title made peak
PR first (xcl.prev.log) 4095 MB 7 960 → 9 447 MB 2 682 CS, 507 PS, 227 VS shaders; 64 compute pipelines 11 435 MB
main second (xcl.log) 4095 MB 9 481 → 15 470 MB 1 843 CS, 2 792 PS, 807 VS, 1 569 AS shaders, mesh pipelines, 14 video-memory arenas 20 977 MB

Both runs had the same coherent window, so this pair is not the window. The title took a different loading path from the start in the second run (the whole graphics set and its arenas within 15 s), and that is the 6 GB jump. The four results alternate low, high, low, high, which fits a profile each run leaves different for the next.

There is a second thing in the same direction: the coherent window is sized from <data>\cache\uma_coherent.txt, written by the previous run, and only when 17 GB of commit is free at start (gpu/uma.rs coherent_hint_for); otherwise it is 512 MB. So a fresh profile, or a run started while something else holds commit, measures a different XCL.

Runs that start from the same state agree. My smoke runs for #2129 and an earlier branch each started from a fresh copy of one profile (made by a previous run, uma_coherent.txt included): five runs over two days, main and PR, came out at 17 499–19 806 MB.

Plan (one PR, scripts/ only): smoke.ps1 -Profile <title data folder> copies that folder to a new data root for the run and points XCL_DATA_ROOT at it, so both runs of a pair start from the same state whatever their order; the block notes that it ran from a profile copy. Evidence in the PR: both orders with and without -Profile on this machine. This does not cover the 17 GB free-commit condition beyond keeping both runs' starting state equal; the script will print the free commit at start so a reader can see it.

AI use: Claude Code (Claude Opus 5.5) read the logs and the code and drafted this comment.

**@⁠Creaa** on GitHub · 2026-11-25 10:41 UTC · [original](https://github.com/xcl-dev/xcl/issues/2225#issuecomment-7160042776) The two numbers come from the runs sharing one title profile, not from run order as such. I'm taking the smoke-script side of this. The #2223 pairs ran `smoke.ps1` without `XCL_DATA_ROOT`, so every run used the same `%LOCALAPPDATA%\XCL\<title>` and started in whatever state the previous run left there (the title's saves and settings, XCL's caches). I have the logs of #2223's second pair on this machine (same RTX 4070, release builds, 60 s): | run | coherent window | commit at 8 s → 14 s | between 6 and 15 s the title made | peak | |---|---|---|---|---| | PR first (`xcl.prev.log`) | 4095 MB | 7 960 → 9 447 MB | 2 682 CS, 507 PS, 227 VS shaders; 64 compute pipelines | 11 435 MB | | main second (`xcl.log`) | 4095 MB | 9 481 → 15 470 MB | 1 843 CS, 2 792 PS, 807 VS, 1 569 AS shaders, mesh pipelines, 14 video-memory arenas | 20 977 MB | Both runs had the same coherent window, so this pair is not the window. The title took a different loading path from the start in the second run (the whole graphics set and its arenas within 15 s), and that is the 6 GB jump. The four results alternate low, high, low, high, which fits a profile each run leaves different for the next. There is a second thing in the same direction: the coherent window is sized from `<data>\cache\uma_coherent.txt`, written by the previous run, and only when 17 GB of commit is free at start (`gpu/uma.rs` `coherent_hint_for`); otherwise it is 512 MB. So a fresh profile, or a run started while something else holds commit, measures a different XCL. Runs that start from the same state agree. My smoke runs for #2129 and an earlier branch each started from a fresh copy of one profile (made by a previous run, `uma_coherent.txt` included): five runs over two days, main and PR, came out at 17 499–19 806 MB. Plan (one PR, `scripts/` only): `smoke.ps1 -Profile <title data folder>` copies that folder to a new data root for the run and points `XCL_DATA_ROOT` at it, so both runs of a pair start from the same state whatever their order; the block notes that it ran from a profile copy. Evidence in the PR: both orders with and without `-Profile` on this machine. This does not cover the 17 GB free-commit condition beyond keeping both runs' starting state equal; the script will print the free commit at start so a reader can see it. AI use: Claude Code (Claude Opus 5.5) read the logs and the code and drafted this comment.
Author
Owner

@⁠itsonewi on GitHub · 2026-11-25 10:49 UTC · original

Thanks - the logs change the diagnosis, and they make the gate problem worse rather than better. The second run did not inherit a different build; it inherited the same %LOCALAPPDATA%\XCL\<title> profile, and from 6-15 s it took a different loading path (1,569 AS shaders, mesh pipelines, 14 arenas) while the first ran 2,682 CS shaders and 64 compute pipelines. Both had the same 4095 MB window, so the window is not the cause of this pair. "Run order" in the title is a proxy for "which run inherited the profile".

For the PR:

  • -Profile (copy the title's data folder to a fresh data root, point XCL_DATA_ROOT at it) is the right fix. Please print in the block that it ran from a copy and the free commit at start, so a reader can see the 17 GB condition; the coherent window alone is not enough to tell two starting states apart.
  • Run both orders with and without -Profile, and show that the two orders agree with -Profile. Lower numbers alone would not prove the starting state was equal.
  • If the different loading path is XCL-side state rather than the title's own saves/settings, it is a runtime issue of its own: #284 covers uma_coherent.txt, but not the mesh/AS path or the 14 arenas. File it separately if the logs show XCL choosing it.

One gate implication: even with -Profile, a single pair still has no error bar. The median of 3+ runs per side (or both orders) is what makes the 125% check meaningful; otherwise the gate should print the ratio and not fail. I have added this to the issue body so the title does not send readers down the wrong path.

**@⁠itsonewi** on GitHub · 2026-11-25 10:49 UTC · [original](https://github.com/xcl-dev/xcl/issues/2225#issuecomment-7160220827) Thanks - the logs change the diagnosis, and they make the gate problem worse rather than better. The second run did not inherit a different build; it inherited the same `%LOCALAPPDATA%\XCL\<title>` profile, and from 6-15 s it took a different loading path (1,569 AS shaders, mesh pipelines, 14 arenas) while the first ran 2,682 CS shaders and 64 compute pipelines. Both had the same 4095 MB window, so the window is not the cause of this pair. "Run order" in the title is a proxy for "which run inherited the profile". For the PR: - `-Profile` (copy the title's data folder to a fresh data root, point `XCL_DATA_ROOT` at it) is the right fix. Please print in the block that it ran from a copy and the free commit at start, so a reader can see the 17 GB condition; the coherent window alone is not enough to tell two starting states apart. - Run both orders with and without `-Profile`, and show that the two orders agree **with** `-Profile`. Lower numbers alone would not prove the starting state was equal. - If the different loading path is XCL-side state rather than the title's own saves/settings, it is a runtime issue of its own: #284 covers `uma_coherent.txt`, but not the mesh/AS path or the 14 arenas. File it separately if the logs show XCL choosing it. One gate implication: even with `-Profile`, a single pair still has no error bar. The median of 3+ runs per side (or both orders) is what makes the 125% check meaningful; otherwise the gate should print the ratio and not fail. I have added this to the issue body so the title does not send readers down the wrong path.
Author
Owner

@⁠Creaa on GitHub · 2026-11-25 10:53 UTC · original

Correction to my comment above: the shared profile is not the cause, and I'm dropping the -Profile plan. I measured it, and the low runs come from fresh copies of a profile too.

Same machine (RTX 4070, 617.14), same release build of main cbc296a for every run, smoke.ps1 -Title RetailTitle, 60 s, eight runs in a row, 62 GB of commit free at every start:

runs peak commit, in order
A: one shared data folder (a copy made once), 4 runs 18 160 · 18 964 · 17 393 · 17 259 MB
B: a fresh copy of the same profile for each run, 4 runs 19 705 · 11 374 · 17 690 · 17 408 MB

Run B2 started from exactly the same state as B1, B3 and B4 and still came out in the low mode. So the two modes are a variation inside a run, not the profile and not the order: here 1 run in 8, in #2223's four runs 2 in 4. The #2223 logs show what the low mode is: the title does not load its graphics set in the first seconds (no AS/PS burst, no video-memory arenas), so the run never commits the ~6 GB the other runs do; why it takes that path on a given run I don't know.

For the gate that means what the issue says: one pair cannot carry a 125 % limit, and a clean change can fail or a regression pass on a single draw. Repeating each side (3 runs, median) or checking the ratio of the two higher runs would both have handled these eight. The coherent-window note in my comment stands on its own (sized from uma_coherent.txt and only with 17 GB of commit free), but it was not what happened here.

Unclaiming: someone else can take the smoke.ps1 -Repeat / median part.

AI use: Claude Code (Claude Opus 5.5) ran the eight runs on my machine and drafted this correction.

**@⁠Creaa** on GitHub · 2026-11-25 10:53 UTC · [original](https://github.com/xcl-dev/xcl/issues/2225#issuecomment-7160314947) **Correction to my comment above: the shared profile is not the cause, and I'm dropping the `-Profile` plan.** I measured it, and the low runs come from fresh copies of a profile too. Same machine (RTX 4070, 617.14), same release build of `main` `cbc296a` for every run, `smoke.ps1 -Title RetailTitle`, 60 s, eight runs in a row, 62 GB of commit free at every start: | runs | peak commit, in order | |---|---| | A: one shared data folder (a copy made once), 4 runs | 18 160 · 18 964 · 17 393 · 17 259 MB | | B: a fresh copy of the same profile for each run, 4 runs | 19 705 · **11 374** · 17 690 · 17 408 MB | Run B2 started from exactly the same state as B1, B3 and B4 and still came out in the low mode. So the two modes are a variation inside a run, not the profile and not the order: here 1 run in 8, in #2223's four runs 2 in 4. The #2223 logs show what the low mode is: the title does not load its graphics set in the first seconds (no AS/PS burst, no video-memory arenas), so the run never commits the ~6 GB the other runs do; why it takes that path on a given run I don't know. For the gate that means what the issue says: one pair cannot carry a 125 % limit, and a clean change can fail or a regression pass on a single draw. Repeating each side (3 runs, median) or checking the ratio of the two higher runs would both have handled these eight. The coherent-window note in my comment stands on its own (sized from `uma_coherent.txt` and only with 17 GB of commit free), but it was not what happened here. Unclaiming: someone else can take the `smoke.ps1 -Repeat` / median part. AI use: Claude Code (Claude Opus 5.5) ran the eight runs on my machine and drafted this correction.
Author
Owner

@⁠itsonewi on GitHub · 2026-11-25 10:59 UTC · original

Thanks for measuring it - the correction is the useful part, and the eight runs settle it: the low mode is a draw inside a run, not the profile or the order. That is worse for the gate than a profile effect, because there is no starting state to normalize; only repeats can tell a low run from a regression.

I updated the issue body with the eight runs and removed the profile claim. -Profile is still worth having for reproducibility (and #1855 wants the manifest), but it is not the fix for this. The fix is -Repeat N plus a median in pr_check.py; until that lands, the 125% check should print the ratio and not fail.

If the low mode is XCL-side (the title sometimes skipping its graphics load), it is a runtime issue of its own; the logs in your table are enough to file it if you see it outside the gate. Unclaiming is fine - the numbers are in the issue for whoever picks it up.

**@⁠itsonewi** on GitHub · 2026-11-25 10:59 UTC · [original](https://github.com/xcl-dev/xcl/issues/2225#issuecomment-7160442488) Thanks for measuring it - the correction is the useful part, and the eight runs settle it: the low mode is a draw inside a run, not the profile or the order. That is worse for the gate than a profile effect, because there is no starting state to normalize; only repeats can tell a low run from a regression. I updated the issue body with the eight runs and removed the profile claim. `-Profile` is still worth having for reproducibility (and #1855 wants the manifest), but it is not the fix for this. The fix is `-Repeat N` plus a median in `pr_check.py`; until that lands, the 125% check should print the ratio and not fail. If the low mode is XCL-side (the title sometimes skipping its graphics load), it is a runtime issue of its own; the logs in your table are enough to file it if you see it outside the gate. Unclaiming is fine - the numbers are in the issue for whoever picks it up.
This discussion has been locked. Commenting is limited to contributors.
No description provided.