Recompiler: XCL_LOOP_BUDGET sets the loop iteration budget of a lane #1284

Open
github-bot wants to merge 2 commits from github-bot/gh-1284 into main AGit
Owner

@⁠upipibi on GitHub · 2026-11-24 14:19 UTC · original
upipibi:feat/loop-budget-env → main · +67 −4 · 4 files · 2 commits · open

LOOP_GUARD caps every lane at 65 536 loop iterations. In the stops of #505, the GPU runs translated compute loops at 100 % for tens of seconds. The current reading there is that the loops run on data a skipped dispatch never wrote:

  • @⁠IvyNotFound found one CS whose loop count is read from a buffer;
  • @⁠oeirughrepuiohg ruled out the split-wave64 meets.

If that reading holds, the budget is what finally ends those loops. There was no way to try a lower one without editing the prelude, so this adds a switch for it. It is a diagnostic, not a fix: the default does not change.

Part of #505.

What is in it

  • gpu/recomp/mod.rs: loop_budget() reads XCL_LOOP_BUDGET. A whole number from 1 sets the budget; anything else keeps 65 536. Documented at LOOP_GUARD.
  • gpu/recomp/emit.rs: with the variable set to anything but 65 536, the prelude's static uint xcl_budget = 1u << 16; becomes static uint xcl_budget = <n>u;. Unset, the HLSL is byte for byte as on main, so DXIL cache keys and driver blobs stay valid (an earlier head wrote a #define into every prelude; changed after @⁠not-rex's point on #505).
  • gpu/recomp/pso.rs: XCL_LOOP_BUDGET joins the switches whose translations are not cached in memory or on disk (cache_allowed, and its test). DXC's cache is keyed by the HLSL, so it stays correct. The first run with a new value recompiles every shader it meets.
  • gpu/recomp/tests.rs:
    • loop_budget_reads_a_whole_number_from_one checks the parser.
    • gpu_loop_budget_caps_a_loop runs a loop whose exit never comes (s_cmp_lg against 0 after the first increment). It checks that the unset translation keeps main's prelude line, then that the loop stops after 4 096 iterations with the budget at 4096, and 61 440 iterations later at 65 536.

Tested

  • AMD and a second NVIDIA card, run by DarkPanda69 (comment, thanks): head f3eb053 applied on main 1a0bbe3, debug, Windows 11, cargo test -p xcl --lib -- gpu:: --test-threads=4. RX 9070 XT (RDNA4, native wave64): gpu_loop_budget_caps_a_loop passes; 631 passed, 2 failed, 22 ignored (the 2 are #2115's AMD fuzz seeds, the same on main). RTX 3060: the new test passes; 633 passed, 0 failed, 22 ignored.
  • At f3eb053f (rebased onto main 426a5a74, the first main with green CI after 5478c4a7, whose two failing tests main fixed in 0d13b071), RTX 3070 (616.56): gpu_ suite (--skip gpu_sparse_vram) 144 passed, 0 failed with XCL_DIRECT_DXIL=0 and with =1. main 426a5a74 gives 143 passed on both.
  • NVIDIA GeForce RTX 3070, driver 616.56; Windows 11 Pro 26100; Rust 1.100.0 MSVC; debug.
  • cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4:
    • this PR at the older head 3980a81 (before the rebases; the current head is f3eb053): 753 passed, 0 failed, 41 ignored;
    • main 930e8b4: 751 passed, 0 failed, 41 ignored, same machine.
    • Both skip the same two tests (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.
  • XCL_LOOP_BUDGET=4096 cargo test -p xcl --lib loop_budget: 2 passed. The budget follows the variable.
  • On cost: in my timing on #505, a 64-thread split-wave64 loop with one exchange per iteration takes 15 ms per Dispatch(4,1,1) to reach 65 536 iterations. At 4 096 it is 16 times shorter.

Regression run

Pair for the current head f3eb053 against main 1a0bbe3, run by thehollowedone (comment, thanks): RTX 3080 Ti (621.35), stock scripts/smoke.ps1, clean release builds, 60 s. Pasted unedited. Their note: it checks the default startup path; the world load and a non-default XCL_LOOP_BUDGET were outside these runs.

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: NVIDIA GeForce RTX 3080 Ti
title: retail-private-fixture
seconds: 60
exit: 0x0
frames shown: 1619 (PresentX 1619)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14439 MB
xcl-smoke v1
commit: f3eb053f932be6070c37300627fa2caf4158e218
gpu: NVIDIA GeForce RTX 3080 Ti
title: retail-private-fixture
seconds: 60
exit: 0x0
frames shown: 1640 (PresentX 1641)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14361 MB

Earlier pair, for the old head 0b28a6b, from Kalmarv's run (thanks):

From Kalmarv's run on an RTX 5070 Ti (NVIDIA 610.74), main 20cf130 and this head 0b28a6b, 60 s each (#1284), thanks:

xcl-smoke v1
commit: 20cf13022f764208384c610c2ae6a3f4eed201a2
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1279 (PresentX 1279)
presents per 2 s (last 3): 4 40 42
device removals: 0
crashes: 0
peak commit: 26967 MB
xcl-smoke v1
commit: 0b28a6bc618d5580c99ada0bc182929536f06abe
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1289 (PresentX 1289)
presents per 2 s (last 3): 11 41 36
device removals: 0
crashes: 0
peak commit: 27396 MB

Not tested

  • Since #2120, main sends enormous compute programs to the direct DXIL translator, which uses its fixed dxil::lower::LOOP_BUDGET. XCL_LOOP_BUDGET sets only the HLSL path's budget, so it doesn't reach those programs.
  • A title, with or without the variable. Whether a working program of the title needs more than a few thousand iterations of one loop per lane, so that a low budget breaks it, is not known.
  • Wine. On AMD, only DarkPanda69's run above.

AI use

  • Claude Code (Claude Opus 5.5) wrote the change and the tests, ran the suites, and wrote this description.

🤖 Generated with Claude Code

**@⁠upipibi** on GitHub · 2026-11-24 14:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284) `upipibi:feat/loop-budget-env` → `main` · +67 −4 · 4 files · 2 commits · open `LOOP_GUARD` caps every lane at 65 536 loop iterations. In the stops of #505, the GPU runs translated compute loops at 100 % for tens of seconds. The current reading there is that the loops run on data a skipped dispatch never wrote: - @⁠IvyNotFound found one CS whose loop count is read from a buffer; - @⁠oeirughrepuiohg ruled out the split-wave64 meets. If that reading holds, the budget is what finally ends those loops. There was no way to try a lower one without editing the prelude, so this adds a switch for it. It is a diagnostic, not a fix: the default does not change. Part of #505. **What is in it** - `gpu/recomp/mod.rs`: `loop_budget()` reads `XCL_LOOP_BUDGET`. A whole number from 1 sets the budget; anything else keeps 65 536. Documented at `LOOP_GUARD`. - `gpu/recomp/emit.rs`: with the variable set to anything but 65 536, the prelude's `static uint xcl_budget = 1u << 16;` becomes `static uint xcl_budget = <n>u;`. Unset, the HLSL is byte for byte as on `main`, so DXIL cache keys and driver blobs stay valid (an earlier head wrote a `#define` into every prelude; changed after @⁠not-rex's point on #505). - `gpu/recomp/pso.rs`: `XCL_LOOP_BUDGET` joins the switches whose translations are not cached in memory or on disk (`cache_allowed`, and its test). DXC's cache is keyed by the HLSL, so it stays correct. The first run with a new value recompiles every shader it meets. - `gpu/recomp/tests.rs`: - `loop_budget_reads_a_whole_number_from_one` checks the parser. - `gpu_loop_budget_caps_a_loop` runs a loop whose exit never comes (`s_cmp_lg` against 0 after the first increment). It checks that the unset translation keeps `main`'s prelude line, then that the loop stops after 4 096 iterations with the budget at 4096, and 61 440 iterations later at 65 536. **Tested** - AMD and a second NVIDIA card, run by DarkPanda69 ([comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1284), thanks): head `f3eb053` applied on `main` `1a0bbe3`, debug, Windows 11, `cargo test -p xcl --lib -- gpu:: --test-threads=4`. RX 9070 XT (RDNA4, native wave64): `gpu_loop_budget_caps_a_loop` passes; 631 passed, 2 failed, 22 ignored (the 2 are #2115's AMD fuzz seeds, the same on `main`). RTX 3060: the new test passes; 633 passed, 0 failed, 22 ignored. - At `f3eb053f` (rebased onto `main` `426a5a74`, the first `main` with green CI after `5478c4a7`, whose two failing tests main fixed in `0d13b071`), RTX 3070 (616.56): `gpu_` suite (`--skip gpu_sparse_vram`) 144 passed, 0 failed with `XCL_DIRECT_DXIL=0` and with `=1`. `main` `426a5a74` gives 143 passed on both. - NVIDIA GeForce RTX 3070, driver 616.56; Windows 11 Pro 26100; Rust 1.100.0 MSVC; debug. - `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4`: - this PR at the older head `3980a81` (before the rebases; the current head is `f3eb053`): 753 passed, 0 failed, 41 ignored; - `main` `930e8b4`: 751 passed, 0 failed, 41 ignored, same machine. - Both skip the same two tests (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. - `XCL_LOOP_BUDGET=4096 cargo test -p xcl --lib loop_budget`: 2 passed. The budget follows the variable. - On cost: in my timing on #505, a 64-thread split-wave64 loop with one exchange per iteration takes 15 ms per `Dispatch(4,1,1)` to reach 65 536 iterations. At 4 096 it is 16 times shorter. **Regression run** Pair for the current head `f3eb053` against `main` `1a0bbe3`, run by thehollowedone ([comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1284), thanks): RTX 3080 Ti (621.35), stock `scripts/smoke.ps1`, clean release builds, 60 s. Pasted unedited. Their note: it checks the default startup path; the world load and a non-default `XCL_LOOP_BUDGET` were outside these runs. ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: NVIDIA GeForce RTX 3080 Ti title: retail-private-fixture seconds: 60 exit: 0x0 frames shown: 1619 (PresentX 1619) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14439 MB ``` ``` xcl-smoke v1 commit: f3eb053f932be6070c37300627fa2caf4158e218 gpu: NVIDIA GeForce RTX 3080 Ti title: retail-private-fixture seconds: 60 exit: 0x0 frames shown: 1640 (PresentX 1641) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14361 MB ``` Earlier pair, for the old head `0b28a6b`, from Kalmarv's run (thanks): From Kalmarv's run on an RTX 5070 Ti (NVIDIA 610.74), `main` `20cf130` and this head `0b28a6b`, 60 s each (https://git.gtahub.st/github/xcl-dev--xcl/pulls/1284), thanks: ``` xcl-smoke v1 commit: 20cf13022f764208384c610c2ae6a3f4eed201a2 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1279 (PresentX 1279) presents per 2 s (last 3): 4 40 42 device removals: 0 crashes: 0 peak commit: 26967 MB ``` ``` xcl-smoke v1 commit: 0b28a6bc618d5580c99ada0bc182929536f06abe gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1289 (PresentX 1289) presents per 2 s (last 3): 11 41 36 device removals: 0 crashes: 0 peak commit: 27396 MB ``` **Not tested** - Since #2120, `main` sends enormous compute programs to the direct DXIL translator, which uses its fixed `dxil::lower::LOOP_BUDGET`. `XCL_LOOP_BUDGET` sets only the HLSL path's budget, so it doesn't reach those programs. - A title, with or without the variable. Whether a working program of the title needs more than a few thousand iterations of one loop per lane, so that a low budget breaks it, is not known. - Wine. On AMD, only DarkPanda69's run above. **AI use** - Claude Code (Claude Opus 5.5) wrote the change and the tests, ran the suites, and wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
`LOOP_GUARD` caps a lane at 65 536 loop iterations (`xcl_budget` in the
prelude). In the stops of #505 the GPU runs translated compute loops for tens
of seconds, apparently on data a skipped dispatch never wrote, and the budget
is what ends them; there was no way to try a lower one without editing the
prelude.

The prelude now takes the budget from `#define XCL_LOOP_BUDGET`, which the
emitter writes from the variable of that name (a whole number from 1; anything
else keeps 65 536). A translation with it set is not cached in memory or on
disk (`cache_allowed`), as for the other translation switches; DXC's own cache
is keyed by the HLSL, so it stays correct.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The budget came in through a `#define` written before every prelude, which
changed every program's HLSL and so every DXIL cache key, even with the
variable unset: one full recompile for everyone after the update. The
prelude keeps its `1u << 16` now, and only a budget other than the default
replaces that line. (Point raised by not-rex on #505.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:49:22 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 14:34 UTC · original

Full-suite run, since this PR has no test report yet. Tested exact head e1573e3 (on its base 930e8b4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 753 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: loop_budget_reads_a_whole_number_from_one, gpu_loop_budget_define_caps_a_loop.

Not tested

  • AMD, a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 14:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284#issuecomment-7134585808) Full-suite run, since this PR has no test report yet. Tested exact head `e1573e3` (on its base `930e8b4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **753 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `loop_budget_reads_a_whole_number_from_one`, `gpu_loop_budget_define_caps_a_loop`. **Not tested** - AMD, a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-24 15:25 UTC · original

Regression pair for 3980a81 against main 930e8b4 (this PR's base), on a retail title, for the Regression run section. Both runs pass: no device removal, no crash, 101 % of main's frames, 105 % of its peak commit.

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (driver 610.74), AMD Ryzen 9 9950X, Windows 11 Pro 26200.
  • scripts/smoke.ps1, the same retail title for 60 s each: main at 930e8b4 (this PR's base) first, then this PR's head, one after the other on the same machine. XCL_LOOP_BUDGET was unset, so the PR's run used the default budget.

main 930e8b4:

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: NVIDIA GeForce RTX 5070 Ti
title: GTA VI
seconds: 60
exit: 0x0
frames shown: 1302 (PresentX 1302)
presents per 2 s (last 3): 12 17 21
device removals: 0
crashes: 0
peak commit: 25725 MB

this PR, 3980a81:

xcl-smoke v1
commit: 3980a81864ea3eb2a181472e857a54b69ae39349
gpu: NVIDIA GeForce RTX 5070 Ti
title: GTA VI
seconds: 60
exit: 0x0
frames shown: 1318 (PresentX 1318)
presents per 2 s (last 3): 39 40 37
device removals: 0
crashes: 0
peak commit: 26939 MB

For #505 (earlier runs, not this pair). On this machine the 100 % phase before the removal is one dispatch: the BVH builder's refit program (cs b6043104de672057), whose threads climb parent links, and a local build of main that skipped it had no device removal. A lower XCL_LOOP_BUDGET caps exactly that climb.

Not tested

  • XCL_PSO_WAIT_MS=50 + XCL_LOOP_BUDGET=4096 for 300 s (on e1573e3, before the last push): it ended at 118 s in the known title crash at +0x2215c35 (#1270), before the point where #505 stops. It may have reused cached programs built with the default budget, so it does not show the 4096 budget applied. There is no main run with these settings.
  • World loading: a 60 s run ends before it, so neither run reaches the point where #505 stops.
  • The whole suite (futurepro62's run above covers it), AMD, Linux.

AI use: Claude Code (Claude Opus 5.5)

**@⁠Kalmarv** on GitHub · 2026-11-24 15:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284#issuecomment-7136003793) Regression pair for `3980a81` against `main` `930e8b4` (this PR's base), on a retail title, for the **Regression run** section. Both runs pass: no device removal, no crash, 101 % of `main`'s frames, 105 % of its peak commit. **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (driver 610.74), AMD Ryzen 9 9950X, Windows 11 Pro 26200. - `scripts/smoke.ps1`, the same retail title for 60 s each: `main` at `930e8b4` (this PR's base) first, then this PR's head, one after the other on the same machine. `XCL_LOOP_BUDGET` was unset, so the PR's run used the default budget. `main` `930e8b4`: ``` xcl-smoke v1 commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56 gpu: NVIDIA GeForce RTX 5070 Ti title: GTA VI seconds: 60 exit: 0x0 frames shown: 1302 (PresentX 1302) presents per 2 s (last 3): 12 17 21 device removals: 0 crashes: 0 peak commit: 25725 MB ``` this PR, `3980a81`: ``` xcl-smoke v1 commit: 3980a81864ea3eb2a181472e857a54b69ae39349 gpu: NVIDIA GeForce RTX 5070 Ti title: GTA VI seconds: 60 exit: 0x0 frames shown: 1318 (PresentX 1318) presents per 2 s (last 3): 39 40 37 device removals: 0 crashes: 0 peak commit: 26939 MB ``` **For #505 (earlier runs, not this pair).** On this machine the 100 % phase before the removal is one dispatch: the BVH builder's refit program (`cs b6043104de672057`), whose threads climb parent links, and a local build of `main` that skipped it had no device removal. A lower `XCL_LOOP_BUDGET` caps exactly that climb. **Not tested** - `XCL_PSO_WAIT_MS=50` + `XCL_LOOP_BUDGET=4096` for 300 s (on `e1573e3`, before the last push): it ended at 118 s in the known title crash at `+0x2215c35` (#1270), before the point where #505 stops. It may have reused cached programs built with the default budget, so it does not show the 4096 budget applied. There is no `main` run with these settings. - World loading: a 60 s run ends before it, so neither run reaches the point where #505 stops. - The whole suite (futurepro62's run above covers it), AMD, Linux. **AI use:** Claude Code (Claude Opus 5.5)
Author
Owner

@⁠not-rex on GitHub · 2026-11-24 19:14 UTC · original

RTX 3080 (10 GB, driver 610.88, Windows 11), retail 1.0.2.1 into the world: with XCL_LOOP_BUDGET=4096 the GPU no longer hangs; it works in bounded bursts and the title keeps presenting for about 110 s longer, until a different fault in the title.

Tested

  • Tree: main 930e8b4 + #1123 + #1254 (diagnostics) + this PR at 3980a81 (clean merge), release. Warm DXIL cache and save from earlier runs, no full pipeline precompile. XCL_PSO_WAIT_MS=50, A pressed at 30 and 40 s, XCL_ACTIVITY=1, XCL_NETWORK=0, 400 s limit, GPU sampled with nvidia-smi every 2 s. One run with the budget; the comparison run is the same tree without this PR (without the variable this PR leaves the HLSL unchanged).
without (main tree) this PR, XCL_LOOP_BUDGET=4096
first ListX #101 90.3 s 88.6 s
presents after #101 12 (last at 124.1 s) 35 (last at 238.2 s)
GPU queue.Wait … did not complete within 5000 ms 18 (first 125.1 s) 93 (first 129.1 s)
"would close a GPU cycle" 5 32
GPU after presents slow down 100 % from ~122 s until the hang 100 % bursts of 6-12 s with idle gaps, ~128-238 s; idle after
end 0x887A0006 (hung) at 168.5 s 0xC0000005 at +0x4e8b4be (read at -1, about ten threads at once) at 241.3 s
peak commit / local video memory 31.9 GB / 14.5 GB 32.7 GB / 15.0 GB

With the budget, the title limps on at about 1 present and 40-60 submissions per 2 s for ~110 s after the point where the tree without it hangs, and the GPU keeps coming back between bursts. That fits the reading on #505 that the stop is loops running long on data a skipped dispatch never wrote. The title then faults at +0x4e8b4be, which I haven't seen in any other run on this machine; it may be what a capped loop leaves behind.

Not tested: other budgets (4096 only); more than one run; without XCL_PSO_WAIT_MS; AMD.

AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine through a scripted runner and wrote this report.

**@⁠not-rex** on GitHub · 2026-11-24 19:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284#issuecomment-7141812198) **RTX 3080 (10 GB, driver 610.88, Windows 11), retail 1.0.2.1 into the world: with `XCL_LOOP_BUDGET=4096` the GPU no longer hangs; it works in bounded bursts and the title keeps presenting for about 110 s longer, until a different fault in the title.** **Tested** - Tree: `main` `930e8b4` + #1123 + #1254 (diagnostics) + this PR at `3980a81` (clean merge), release. Warm DXIL cache and save from earlier runs, no full pipeline precompile. `XCL_PSO_WAIT_MS=50`, A pressed at 30 and 40 s, `XCL_ACTIVITY=1`, `XCL_NETWORK=0`, 400 s limit, GPU sampled with `nvidia-smi` every 2 s. One run with the budget; the comparison run is the same tree without this PR (without the variable this PR leaves the HLSL unchanged). | | without (`main` tree) | this PR, `XCL_LOOP_BUDGET=4096` | |---|---|---| | first `ListX #101` | 90.3 s | 88.6 s | | presents after `#101` | 12 (last at 124.1 s) | 35 (last at 238.2 s) | | `GPU queue.Wait … did not complete within 5000 ms` | 18 (first 125.1 s) | 93 (first 129.1 s) | | "would close a GPU cycle" | 5 | 32 | | GPU after presents slow down | 100 % from ~122 s until the hang | 100 % bursts of 6-12 s with idle gaps, ~128-238 s; idle after | | end | `0x887A0006` (hung) at 168.5 s | `0xC0000005` at `+0x4e8b4be` (read at -1, about ten threads at once) at 241.3 s | | peak commit / local video memory | 31.9 GB / 14.5 GB | 32.7 GB / 15.0 GB | With the budget, the title limps on at about 1 present and 40-60 submissions per 2 s for ~110 s after the point where the tree without it hangs, and the GPU keeps coming back between bursts. That fits the reading on #505 that the stop is loops running long on data a skipped dispatch never wrote. The title then faults at `+0x4e8b4be`, which I haven't seen in any other run on this machine; it may be what a capped loop leaves behind. **Not tested:** other budgets (4096 only); more than one run; without `XCL_PSO_WAIT_MS`; AMD. AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine through a scripted runner and wrote this report.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 23:32 UTC · original

Rebased onto main 20cf130 (now 0b28a6b). One conflict in recomp/mod.rs: #1307's STRUCTURED_BYTES_PER_CODE_BYTE landed next to loop_budget; both are kept, unchanged. RTX 3070, driver 616.56: tests matching loop_budget / loop, 23 passed, 0 failed, with and without XCL_DIRECT_DXIL=1.

**@⁠upipibi** on GitHub · 2026-11-24 23:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284#issuecomment-7147509990) Rebased onto `main` `20cf130` (now `0b28a6b`). One conflict in `recomp/mod.rs`: #1307's `STRUCTURED_BYTES_PER_CODE_BYTE` landed next to `loop_budget`; both are kept, unchanged. RTX 3070, driver 616.56: tests matching `loop_budget` / `loop`, 23 passed, 0 failed, with and without `XCL_DIRECT_DXIL=1`.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 23:39 UTC · original

The rebase onto 20cf130 moved the head to 0b28a6b, so the PR description check now wants the Regression-run pair made on that head. The pair in the description (Kalmarv's, thanks) is for 3980a81. The rebase changed only the conflict lines in recomp/mod.rs; loop_budget is untouched and the suite passes. I can't make a smoke run here (no title). If someone with one has a minute, a scripts/smoke.ps1 pair of main 20cf130 and 0b28a6b would clear it, and I'll paste it in with credit.

**@⁠upipibi** on GitHub · 2026-11-24 23:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284#issuecomment-7147658964) The rebase onto `20cf130` moved the head to `0b28a6b`, so the `PR description` check now wants the Regression-run pair made on that head. The pair in the description (Kalmarv's, thanks) is for `3980a81`. The rebase changed only the conflict lines in `recomp/mod.rs`; `loop_budget` is untouched and the suite passes. I can't make a smoke run here (no title). If someone with one has a minute, a `scripts/smoke.ps1` pair of `main` `20cf130` and `0b28a6b` would clear it, and I'll paste it in with credit.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-24 23:45 UTC · original

@⁠upipibi on it: a scripts/smoke.ps1 pair of main 20cf130 and 0b28a6b on an RTX 5070 Ti is queued behind a run that's using the GPU now. I'll post both blocks here within the hour.

AI use: Claude Code (Claude Opus 5.5) wrote this.

**@⁠Kalmarv** on GitHub · 2026-11-24 23:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284#issuecomment-7147766789) @⁠upipibi on it: a `scripts/smoke.ps1` pair of `main` `20cf130` and `0b28a6b` on an RTX 5070 Ti is queued behind a run that's using the GPU now. I'll post both blocks here within the hour. AI use: Claude Code (Claude Opus 5.5) wrote this.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-25 00:03 UTC · original

@⁠upipibi here is the pair. scripts/smoke.ps1, the same retail title for 60 s each, one after the other, release builds from clean trees. RTX 5070 Ti (NVIDIA 610.74), Ryzen 9 9950X, Windows 11 26200. A separate NVIDIA driver build was running in another process during both runs.

main 20cf130:

xcl-smoke v1
commit: 20cf13022f764208384c610c2ae6a3f4eed201a2
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1279 (PresentX 1279)
presents per 2 s (last 3): 4 40 42
device removals: 0
crashes: 0
peak commit: 26967 MB

#1284 0b28a6b:

xcl-smoke v1
commit: 0b28a6bc618d5580c99ada0bc182929536f06abe
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1289 (PresentX 1289)
presents per 2 s (last 3): 11 41 36
device removals: 0
crashes: 0
peak commit: 27396 MB

1289 / 1279 frames (101 %), peak commit 27396 / 26967 MB (102 %), no device removal or crash on either run. No out-of-memory or exception lines in either log.

AI use: Claude Code (Claude Opus 5.5) ran the pair and wrote this.

**@⁠Kalmarv** on GitHub · 2026-11-25 00:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284#issuecomment-7148089060) @⁠upipibi here is the pair. `scripts/smoke.ps1`, the same retail title for 60 s each, one after the other, release builds from clean trees. RTX 5070 Ti (NVIDIA 610.74), Ryzen 9 9950X, Windows 11 26200. A separate NVIDIA driver build was running in another process during both runs. `main` `20cf130`: ``` xcl-smoke v1 commit: 20cf13022f764208384c610c2ae6a3f4eed201a2 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1279 (PresentX 1279) presents per 2 s (last 3): 4 40 42 device removals: 0 crashes: 0 peak commit: 26967 MB ``` #1284 `0b28a6b`: ``` xcl-smoke v1 commit: 0b28a6bc618d5580c99ada0bc182929536f06abe gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1289 (PresentX 1289) presents per 2 s (last 3): 11 41 36 device removals: 0 crashes: 0 peak commit: 27396 MB ``` 1289 / 1279 frames (101 %), peak commit 27396 / 26967 MB (102 %), no device removal or crash on either run. No out-of-memory or exception lines in either log. AI use: Claude Code (Claude Opus 5.5) ran the pair and wrote this.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 03:00 UTC · original

XCL PR #1284 — Intel Arc A770 loop budget compatibility

Tested

  • Exact clean head 81745f8d185f1f90d893cc3700e25f4830ba96f2. GitHub showed the PR open at that head before and after the run. I checked the seven existing comments and found no Arc report for this head. PR #1284
  • Intel Arc A770, driver 32.0.101.9175, AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation 25H2 build 26200.9974. Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), Cargo 1.100.0 (3acc79c0c), unoptimized test profile. The GPU log reports dxcompiler 1.9.2609.5 (01b62ad4) and dxil 1.9.2609.5 from the configured DXC directory. dxc.exe in that directory also reports file version 1.9.2609.5.
  • The parser fixture passed in 0.40 s. Counts were 1 passed, 0 failed, 0 ignored, 0 skipped.
  • The bounded HLSL/DXC GPU fixture passed in 3.82 s under the Arc lock. Counts were 1 passed, 0 failed, 0 ignored, 0 skipped. With XCL_LOOP_BUDGET unset, it verified the default prelude line and dispatched the checked-in wave32 cases for 4,096 and 65,536. Its assertions verified that the smaller case returned 4,096 or 4,097 and that the default-budget case returned exactly 61,440 more. The fixture reports the combined time and only prints exact counter values on an assertion failure.
  • Each exact harness invocation filtered out 1,125 other tests. Cargo prebuild and both test processes exited 0. The GPU log records acquisition and release of the Arc lock.

Commands

Process environment for both commands (XCL_LOOP_BUDGET unset).

CARGO_TARGET_DIR=L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target
CARGO_BUILD_JOBS=2
CARGO_INCREMENTAL=0
CARGO_PROFILE_DEV_DEBUG=0
CARGO_PROFILE_TEST_DEBUG=0
TEMP=L:/XclTooling/pr1284/81745f8-20261125-035452420/temp
TMP=L:/XclTooling/pr1284/81745f8-20261125-035452420/temp
XCL_ADAPTER=A770
XCL_DXC_DIR=C:/Users/ljensen/AppData/Local/XclTooling/dxc-1.9.2609/bin/x64

Prebuilt the library test executable outside the Arc lock (Cargo reported 1m 02s).

& 'C:/Users/ljensen/.cargo/bin/cargo.exe' +stable-x86_64-pc-windows-msvc test -p xcl --lib --no-run --locked --message-format=json

Exact test arguments for the Cargo-reported executable.

$bin = 'L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target/debug/build/xcl/97fdf2b9ff8e1482/out/xcl-97fdf2b9ff8e1482.exe'
& $bin gpu::recomp::tests::loop_budget_reads_a_whole_number_from_one --exact --nocapture --test-threads=1
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & $bin gpu::recomp::tests::gpu_loop_budget_caps_a_loop --exact --nocapture --test-threads=1 }

The GPU command ran in a child Windows PowerShell with -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -EncodedCommand, with the test executable path passed through XCL_PR1284_LIBTEST_EXE. RemoteSigned applied to that process only. The machine policy was unchanged.

Logs beside this report include prebuild.log, prebuild.jsonl, parser.stdout.log, parser.stderr.log, gpu.stdout.log, gpu.stderr.log, and run-status.log.

Not tested

  • Retail titles or the paired main/PR smoke run, the workspace suite, release builds, other adapters, the direct DXIL backend, or stress cases. The GPU fixture exercised only its checked-in 4,096 and 65,536 budgets.

AI use

  • T3 Code / Codex (gpt-6.2-sol) ran the two checked-in fixtures, verified the head and existing conversation, and wrote this report.
**@⁠JJAutoCompare** on GitHub · 2026-11-25 03:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284#issuecomment-7151501642) XCL PR #1284 — Intel Arc A770 loop budget compatibility Tested - Exact clean head 81745f8d185f1f90d893cc3700e25f4830ba96f2. GitHub showed the PR open at that head before and after the run. I checked the seven existing comments and found no Arc report for this head. [PR #1284](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1284) - Intel Arc A770, driver 32.0.101.9175, AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation 25H2 build 26200.9974. Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), Cargo 1.100.0 (3acc79c0c), unoptimized test profile. The GPU log reports dxcompiler 1.9.2609.5 (01b62ad4) and dxil 1.9.2609.5 from the configured DXC directory. dxc.exe in that directory also reports file version 1.9.2609.5. - The parser fixture passed in 0.40 s. Counts were 1 passed, 0 failed, 0 ignored, 0 skipped. - The bounded HLSL/DXC GPU fixture passed in 3.82 s under the Arc lock. Counts were 1 passed, 0 failed, 0 ignored, 0 skipped. With XCL_LOOP_BUDGET unset, it verified the default prelude line and dispatched the checked-in wave32 cases for 4,096 and 65,536. Its assertions verified that the smaller case returned 4,096 or 4,097 and that the default-budget case returned exactly 61,440 more. The fixture reports the combined time and only prints exact counter values on an assertion failure. - Each exact harness invocation filtered out 1,125 other tests. Cargo prebuild and both test processes exited 0. The GPU log records acquisition and release of the Arc lock. Commands Process environment for both commands (XCL_LOOP_BUDGET unset). CARGO_TARGET_DIR=L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target CARGO_BUILD_JOBS=2 CARGO_INCREMENTAL=0 CARGO_PROFILE_DEV_DEBUG=0 CARGO_PROFILE_TEST_DEBUG=0 TEMP=L:/XclTooling/pr1284/81745f8-20261125-035452420/temp TMP=L:/XclTooling/pr1284/81745f8-20261125-035452420/temp XCL_ADAPTER=A770 XCL_DXC_DIR=C:/Users/ljensen/AppData/Local/XclTooling/dxc-1.9.2609/bin/x64 Prebuilt the library test executable outside the Arc lock (Cargo reported 1m 02s). & 'C:/Users/ljensen/.cargo/bin/cargo.exe' +stable-x86_64-pc-windows-msvc test -p xcl --lib --no-run --locked --message-format=json Exact test arguments for the Cargo-reported executable. $bin = 'L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target/debug/build/xcl/97fdf2b9ff8e1482/out/xcl-97fdf2b9ff8e1482.exe' & $bin gpu::recomp::tests::loop_budget_reads_a_whole_number_from_one --exact --nocapture --test-threads=1 & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & $bin gpu::recomp::tests::gpu_loop_budget_caps_a_loop --exact --nocapture --test-threads=1 } The GPU command ran in a child Windows PowerShell with -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -EncodedCommand, with the test executable path passed through XCL_PR1284_LIBTEST_EXE. RemoteSigned applied to that process only. The machine policy was unchanged. Logs beside this report include prebuild.log, prebuild.jsonl, parser.stdout.log, parser.stderr.log, gpu.stdout.log, gpu.stderr.log, and run-status.log. Not tested - Retail titles or the paired main/PR smoke run, the workspace suite, release builds, other adapters, the direct DXIL backend, or stress cases. The GPU fixture exercised only its checked-in 4,096 and 65,536 budgets. AI use - T3 Code / Codex (gpt-6.2-sol) ran the two checked-in fixtures, verified the head and existing conversation, and wrote this report.
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-25 12:14 UTC · original

Here is the requested pair from the stock scripts/smoke.ps1 on clean release builds of main 1a0bbe3 and PR head f3eb053.

RTX 3080 Ti (621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC. Both runs used separate copies of the same starting profile and DXIL cache seed, networking and PSO preload off, a 16 GiB job commit cap, and a 12 GiB system commit floor. XCL_LOOP_BUDGET was unset and no input was sent. Both runs completed normally.

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: NVIDIA GeForce RTX 3080 Ti
title: retail-private-fixture
seconds: 60
exit: 0x0
frames shown: 1619 (PresentX 1619)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14439 MB
xcl-smoke v1
commit: f3eb053f932be6070c37300627fa2caf4158e218
gpu: NVIDIA GeForce RTX 3080 Ti
title: retail-private-fixture
seconds: 60
exit: 0x0
frames shown: 1640 (PresentX 1641)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14361 MB

This checks the default startup path. World load and the non-default loop budget were outside these runs.

AI-assisted. Codex (GPT-6, exact variant unavailable) ran the smoke pair and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-25 12:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284#issuecomment-7162107083) Here is the requested pair from the stock `scripts/smoke.ps1` on clean release builds of [main 1a0bbe3](https://github.com/xcl-dev/xcl/commit/1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6) and [PR head f3eb053](https://github.com/xcl-dev/xcl/commit/f3eb053f932be6070c37300627fa2caf4158e218). RTX 3080 Ti (621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC. Both runs used separate copies of the same starting profile and DXIL cache seed, networking and PSO preload off, a 16 GiB job commit cap, and a 12 GiB system commit floor. `XCL_LOOP_BUDGET` was unset and no input was sent. Both runs completed normally. ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: NVIDIA GeForce RTX 3080 Ti title: retail-private-fixture seconds: 60 exit: 0x0 frames shown: 1619 (PresentX 1619) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14439 MB ``` ``` xcl-smoke v1 commit: f3eb053f932be6070c37300627fa2caf4158e218 gpu: NVIDIA GeForce RTX 3080 Ti title: retail-private-fixture seconds: 60 exit: 0x0 frames shown: 1640 (PresentX 1641) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14361 MB ``` This checks the default startup path. World load and the non-default loop budget were outside these runs. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the smoke pair and drafted this report.
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-25 13:26 UTC · original

AMD run (listed as untested), plus an RTX 3060: the new GPU test passes on both.

Head f3eb053 applied on main 1a0bbe3, debug, Windows 11 Pro 26200, cargo test -p xcl --lib -- gpu:: --test-threads=4:

  • RX 9070 XT (RDNA4, driver 32.0.32029.2010, native wave64): gpu_loop_budget_caps_a_loop ok. 631 passed, 2 failed, 22 ignored, 6 SKIPPED; the 2 failures are the AMD fuzz seeds tracked in #2115, the same on main.
  • RTX 3060 (driver 32.0.16.1088): the new test ok; 633 passed, 0 failed, 22 ignored.

Not tested: a title with or without XCL_LOOP_BUDGET, Wine.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

**@⁠DarkPanda69** on GitHub · 2026-11-25 13:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284#issuecomment-7163789100) AMD run (listed as untested), plus an RTX 3060: the new GPU test passes on both. Head `f3eb053` applied on `main` `1a0bbe3`, debug, Windows 11 Pro 26200, `cargo test -p xcl --lib -- gpu:: --test-threads=4`: - **RX 9070 XT** (RDNA4, driver 32.0.32029.2010, native wave64): `gpu_loop_budget_caps_a_loop` ok. 631 passed, 2 failed, 22 ignored, 6 SKIPPED; the 2 failures are the AMD fuzz seeds tracked in #2115, the same on `main`. - **RTX 3060** (driver 32.0.16.1088): the new test ok; 633 passed, 0 failed, 22 ignored. Not tested: a title with or without `XCL_LOOP_BUDGET`, Wine. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 01:17 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 01:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/1284#issuecomment-7179627284) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 26 ignored. Thanks! — Devin
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1284/head:github-bot/gh-1284'
git switch 'github-bot/gh-1284'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1284'
git switch 'github-bot/gh-1284'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1284'
git switch 'github-bot/gh-1284'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1284'
git switch 'main'
git merge --squash 'github-bot/gh-1284'
git switch 'main'
git merge --ff-only 'github-bot/gh-1284'
git switch 'main'
git merge 'github-bot/gh-1284'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.