tests: startup_compute_gather_l is flaky, about one run in three #3694

Open
opened 2026-12-01 02:50:20 +00:00 by KelboLive · 5 comments
KelboLive commented 2026-12-01 02:50:20 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-12-01T02:50:20Z.


tests: startup_compute_gather_l is flaky, about one run in three

Summary

startup_compute_gather_l fails intermittently with a one-word readback mismatch. It is not a regression, and
it does not bisect — which I found out the hard way, see below.

word=0 expected=3f1020e2 actual=3f201062
Compute readback differs from CPU reference
backend=hardware debug_layer=enabled
debug_errors=0 debug_warnings=0

Measurement

At 12a0e309f, three consecutive runs of the warp variant:

Passed 6.36 s
Passed 6.58 s
***Failed 6.24 s

So roughly one in three, on a test that takes six seconds — enough to fail a hardware sweep and enough to
waste a bisect.

Why this is not a regression

It passed in the bee9c64 hardware sweep (990/990). That, plus the intermittent rate, means it cannot be
attributed by bisecting on single runs — but I tried:

Commit Result
409f12782 Passed
2103d6529 Passed
436242d56 Passed
7bb79add6 Passed
2d5ab308f Failed once
2d5ab308f (two re-runs) Passed, Passed

That last row is the point: the same commit failed and then passed twice. A bisect over a one-in-three failure
produces a confident wrong answer, and I nearly filed 2d5ab308f (#3619) as the cause.

Suggested next step

Loop the warp variant on one commit to get the real rate, then look at the synchronisation between the
dispatch and the readback in tests/startup_compute_gather_l_check.py — mismatches=0 and
debug_errors=0 in every passing block suggests the data is right when the copy lands, and wrong only in the
rare run where ordering or a stale cache decides it.

--jobs is not involved: the test compiles one program, and the parallel option belongs to the --refusals
mode of compile_dxil.

The same sweep produced four SV_Position failures (msg 660) which are a real regression, reported in #3693.
This one is separate and should not be lumped in.

Refs #3693, #3507.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6711222451 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3694). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T02:50:20Z. --- # tests: `startup_compute_gather_l` is flaky, about one run in three ## Summary `startup_compute_gather_l` fails intermittently with a one-word readback mismatch. It is not a regression, and it does not bisect — which I found out the hard way, see below. ``` word=0 expected=3f1020e2 actual=3f201062 Compute readback differs from CPU reference backend=hardware debug_layer=enabled debug_errors=0 debug_warnings=0 ``` ## Measurement At `12a0e309f`, three consecutive runs of the warp variant: ``` Passed 6.36 s Passed 6.58 s ***Failed 6.24 s ``` So roughly one in three, on a test that takes six seconds — enough to fail a hardware sweep and enough to waste a bisect. ## Why this is not a regression It passed in the `bee9c64` hardware sweep (990/990). That, plus the intermittent rate, means it cannot be attributed by bisecting on single runs — but I tried: | Commit | Result | |---|---| | `409f12782` | Passed | | `2103d6529` | Passed | | `436242d56` | Passed | | `7bb79add6` | Passed | | `2d5ab308f` | **Failed once** | | `2d5ab308f` (two re-runs) | Passed, Passed | That last row is the point: the same commit failed and then passed twice. A bisect over a one-in-three failure produces a confident wrong answer, and I nearly filed `2d5ab308f` (#3619) as the cause. ## Suggested next step Loop the warp variant on one commit to get the real rate, then look at the synchronisation between the dispatch and the readback in `tests/startup_compute_gather_l_check.py` — `mismatches=0` and `debug_errors=0` in every passing block suggests the data is right when the copy lands, and wrong only in the rare run where ordering or a stale cache decides it. `--jobs` is not involved: the test compiles one program, and the parallel option belongs to the `--refusals` mode of `compile_dxil`. ## Related The same sweep produced four `SV_Position` failures (msg 660) which are a real regression, reported in #3693. This one is separate and should not be lumped in. Refs #3693, #3507.
legacy-code-archaeologist commented 2026-12-01 03:01:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-12-01T03:01:28Z.


I reproduced this on main 1a9ccbc4 with the in-box WARP (Windows 11 10.0.26100, driver 10.0.26100.9711). startup_compute_gather_l_warp failed 8 of 8 runs here, always at the same place, and I think the quoted mismatch is not the failure.

The quoted line is a negative control. dispatch() runs six mutants after the positive cases. Each mutant has to produce a mismatch, and each one prints a word=0 … differs from CPU reference line:

Mutant Printed line
dropped_gather expected=3f1020e2 actual=00000000
wrong_component expected=3f1020e2 actual=3f1020e0
forced_mip_zero expected=3f1020e2 actual=3f0041e2
wrong_first_mip expected=3f1020e6 actual=3f0041e6
wrong_tap_order expected=3f1020e2 actual=3f1010e2
ignored_max_lod expected=3f1020e2 actual=3f201062

actual=3f201062 is the ignored_max_lod control, which is expected to differ and passes its assertion. All six appear in every run, passing or failing.

The failure is the pixel half. After the controls, dispatch_ps() asserts at tests/startup_compute_gather_l_check.py:337, and the renderer output is:

Translated pixel pipeline failed (HRESULT 0x80070057)

That is the PSO creation error from #3693, the shared pixel_aot_vs.hlsl output change. WARP has no debug layer here, so message 660 is not printed, but the HRESULT is the same. Because dispatch_ps() runs last, the visible output ends with the mutant lines and the assertion's renderer text. A failing run therefore looks like a compute mismatch.

So on this host it is deterministic and comes from #3693. I can't explain a one-in-three rate from this. If your passing runs were on a tree before #3623, or on a configuration where the pixel half returns 77, that would account for it. Running ctest -R '^startup_compute_gather_l_warp$' --output-on-failure and reading past the mutant lines to the AssertionError should show which half failed.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7299240861 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3694#issuecomment-7299240861). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-12-01T03:01:28Z. --- I reproduced this on `main` `1a9ccbc4` with the in-box WARP (Windows 11 10.0.26100, driver 10.0.26100.9711). `startup_compute_gather_l_warp` failed **8 of 8** runs here, always at the same place, and I think the quoted mismatch is not the failure. **The quoted line is a negative control.** `dispatch()` runs six mutants after the positive cases. Each mutant has to produce a mismatch, and each one prints a `word=0 … differs from CPU reference` line: | Mutant | Printed line | |---|---| | `dropped_gather` | `expected=3f1020e2 actual=00000000` | | `wrong_component` | `expected=3f1020e2 actual=3f1020e0` | | `forced_mip_zero` | `expected=3f1020e2 actual=3f0041e2` | | `wrong_first_mip` | `expected=3f1020e6 actual=3f0041e6` | | `wrong_tap_order` | `expected=3f1020e2 actual=3f1010e2` | | `ignored_max_lod` | `expected=3f1020e2 actual=3f201062` | `actual=3f201062` is the `ignored_max_lod` control, which is expected to differ and passes its assertion. All six appear in every run, passing or failing. **The failure is the pixel half.** After the controls, `dispatch_ps()` asserts at `tests/startup_compute_gather_l_check.py:337`, and the renderer output is: ``` Translated pixel pipeline failed (HRESULT 0x80070057) ``` That is the PSO creation error from #3693, the shared `pixel_aot_vs.hlsl` output change. WARP has no debug layer here, so message 660 is not printed, but the HRESULT is the same. Because `dispatch_ps()` runs last, the visible output ends with the mutant lines and the assertion's renderer text. A failing run therefore looks like a compute mismatch. So on this host it is deterministic and comes from #3693. I can't explain a one-in-three rate from this. If your passing runs were on a tree before #3623, or on a configuration where the pixel half returns 77, that would account for it. Running `ctest -R '^startup_compute_gather_l_warp$' --output-on-failure` and reading past the mutant lines to the `AssertionError` should show which half failed. AI-assisted.
SimSalabimse commented 2026-12-01 08:46:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T08:46:46Z.


I'll take #3694. The printed word=0 expected=3f1020e2 actual=3f201062 line is the ignored_max_lod negative control, and dispatch_ps() afterwards can fail with the #3693 pixel-pipeline HRESULT, so I'll make the test say which half failed. I won't touch the shared vertex shader (that's #3698). After that isolation is on the tree, I'll loop the warp variant on the test PC to measure any remaining rate, and if a compute/readback flake remains, I'll fix the dispatch-to-readback sync in run_compute / submit_and_wait.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7305772826 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3694#issuecomment-7305772826). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-12-01T08:46:46Z. --- I'll take #3694. The printed `word=0 expected=3f1020e2 actual=3f201062` line is the `ignored_max_lod` negative control, and `dispatch_ps()` afterwards can fail with the #3693 pixel-pipeline HRESULT, so I'll make the test say which half failed. I won't touch the shared vertex shader (that's #3698). After that isolation is on the tree, I'll loop the warp variant on the test PC to measure any remaining rate, and if a compute/readback flake remains, I'll fix the dispatch-to-readback sync in `run_compute` / `submit_and_wait`. AI-Assisted
KelboLive commented 2026-12-01 09:17:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-12-01T09:17:11Z.


One measurement that bears on the "is it #3693 leaking through dispatch_ps()" question, since it does not fit a deterministic failure:

At 12a0e309f (where the #3693 breakage is present), three consecutive runs of startup_compute_gather_l_warp:

Passed 6.36 s
Passed 6.58 s
***Failed 6.24 s

And the same commit-level test at 2d5ab308f, where I first saw it fail, then passed twice in a row on re-run:

***Failed 6.23 s
Passed 6.18 s
Passed 6.28 s

If the failure were only the #3693 pipeline HRESULT reaching dispatch_ps(), I would expect it every run at those trees, since #3623 is present in both. So either the pixel half is conditional, or there is a second, genuinely intermittent component.

That is also why I filed this as flaky rather than as a bisected regression: I had a bisect that pointed at 2d5ab308f (#3619) on one run per step, and then that commit passed twice, which invalidated it. If your isolation shows which half fails, it would be worth re-running the same commit several times to see whether the failing half is stable — the data above says single runs are not enough to decide.

Not attached to this issue: I am not editing the fixture, it is yours.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7306481127 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3694#issuecomment-7306481127). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T09:17:11Z. --- One measurement that bears on the "is it #3693 leaking through `dispatch_ps()`" question, since it does not fit a deterministic failure: At `12a0e309f` (where the #3693 breakage is present), three consecutive runs of `startup_compute_gather_l_warp`: ``` Passed 6.36 s Passed 6.58 s ***Failed 6.24 s ``` And the same commit-level test at `2d5ab308f`, where I first saw it fail, then passed twice in a row on re-run: ``` ***Failed 6.23 s Passed 6.18 s Passed 6.28 s ``` If the failure were only the #3693 pipeline HRESULT reaching `dispatch_ps()`, I would expect it every run at those trees, since #3623 is present in both. So either the pixel half is conditional, or there is a second, genuinely intermittent component. That is also why I filed this as flaky rather than as a bisected regression: I had a bisect that pointed at `2d5ab308f` (#3619) on one run per step, and then that commit passed twice, which invalidated it. If your isolation shows which half fails, it would be worth re-running the same commit several times to see whether the failing half is stable — the data above says single runs are not enough to decide. Not attached to this issue: I am not editing the fixture, it is yours.
SimSalabimse commented 2026-12-01 09:49:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T09:49:13Z.


Windows WARP follow-up from #3714 at fc562ff3: startup_compute_gather_l_warp was looped 30 times, each as its own ctest process. There was no compute or readback flake in those 30 runs (compute residual 0); every failure was the #3693 pixel half (HRESULT 0x80070057, SV_Position register mismatch). The new labels name that pixel half instead of looking like a compute flake.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7307253608 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3694#issuecomment-7307253608). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-12-01T09:49:13Z. --- Windows WARP follow-up from #3714 at fc562ff3: startup_compute_gather_l_warp was looped 30 times, each as its own ctest process. There was no compute or readback flake in those 30 runs (compute residual 0); every failure was the #3693 pixel half (HRESULT 0x80070057, SV_Position register mismatch). The new labels name that pixel half instead of looking like a compute flake. AI-Assisted
KelboLive commented 2026-12-01 10:17:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-12-01T10:17:28Z.


Independent confirmation of the 30-run loop: at 1949fe015 (the #3698 head, where the 660 cause is fixed), startup_compute_gather_l_warp looped ten times, each its own ctest process:

passed=10 failed=0

That agrees with your measurement: with the pixel half fixed there is no compute or readback flake left in this test, so the intermittent failures I saw were #3693 reaching dispatch_ps() after the compute half had already passed. My "flaky" label in this issue was the wrong conclusion — I had two failures and two passes on single runs and inferred a rate, when the thing that varied was the pixel half, not the compute one.

So this closes with the two fixes rather than needing a compute-side change: the last useful piece is your labelling in #3714, which makes the next failure name its half.

Re-running the loop a few times on main after #3698 merges would confirm the same at head, but there is nothing left to diagnose here.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7307960197 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3694#issuecomment-7307960197). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T10:17:28Z. --- Independent confirmation of the 30-run loop: at `1949fe015` (the #3698 head, where the 660 cause is fixed), `startup_compute_gather_l_warp` looped ten times, each its own ctest process: ``` passed=10 failed=0 ``` That agrees with your measurement: with the pixel half fixed there is no compute or readback flake left in this test, so the intermittent failures I saw were #3693 reaching `dispatch_ps()` after the compute half had already passed. My "flaky" label in this issue was the wrong conclusion — I had two failures and two passes on single runs and inferred a rate, when the thing that varied was the pixel half, not the compute one. So this closes with the two fixes rather than needing a compute-side change: the last useful piece is your labelling in #3714, which makes the next failure name its half. Re-running the loop a few times on `main` after #3698 merges would confirm the same at head, but there is nothing left to diagnose here.
Sign in to join this conversation.
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
R0Y00/Xbox2Windows#3694
No description provided.