Per-lane: two wave32 compute programs do not finish on the GPU, two wave64 ones take 190–360 ms a call (retail title, NVIDIA) #2647

Open
opened 2026-11-26 06:14:31 +00:00 by github-bot · 0 comments
Owner

@⁠voiceovarian1-max on GitHub · 2026-11-26 04:59 UTC · original

With XCL_PER_LANE=1 the retail title (TitleID 7952987A, the one of #505) loses its device at the first world frames: the per-lane form of two wave32 compute programs does not finish on the GPU. With the per-lane form kept to wave64 programs there is no hang, but two small programs take 189 ms and 357 ms a call and the world runs at 0.5 fps.

Setup: #2057's head 4df1e6e (on main 568e7db, so without the per-lane fixes merged or opened since: #2117, #2128, #2503, #2321 …) plus local changes outside the recompiler. Linux 7.3, Proton Experimental's Wine, vkd3d-proton 3.1 with the XCL patch, RTX 4070 Ti 12 GB (driver 620.73.04), i7-14700K. XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PER_LANE=1 XCL_GPU_PROFILE=1, Series S, runs of 120–200 s. The programs are named by XCL_GPU_PROFILE.

[SHADER] hash Shape With XCL_PER_LANE=1 Per-instruction form
a2325a5828f82784 CS, 32x1x1 threads, wave32, 9,508 B code; Dispatch of 17x1x1 groups RUNNING for 4411 ms and not finished, Xid 109 (CTX SWITCH TIMEOUT), device removed at ~72 s ~0.26 ms a call (8,810 calls)
6f2d17214d434d66 CS, 32x1x1 threads, wave32, 12,676 B code; 36x1x1 groups with the first one kept out: RUNNING for 5811 ms and not finished, device removed at ~74 s ~0.8 ms a call
4ef76f69bf3b5606 CS, 16x16x1 threads, wave64, 1,936 B code; 69x39x1 groups 357 ms a call (122 calls, 43.5 s of GPU time in 200 s) not in the top-15 lists
be7a084f47ea94d5 CS, 16x16x1 threads, wave64, 1,300 B code; 69x39x1 groups 189 ms a call (244 calls, 46.2 s) not in the top-15 lists
  • The first two rows are two runs: the second with a local switch that keeps one hash in the per-instruction form. The last two are a third run with a local switch that gives the per-lane form to wave64 programs only; that run had no hang and no GPU-wait timeout.
  • The programs that take most GPU time here did not get cheaper in that third run: 56c0cd3b82a00c6e 9.8 ms a call (9.6 in the per-instruction form), 7bb2d0b9894ded7f 20.0 ms (21.2), a74706fb8f96ade9 66 µs (72).
  • 788 program builds were refused by the per-lane form and fell back: a branch on whether any lane of a mask is set, with lanes in EXEC without its bit 215, unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's) 207, unsupported IMAGE_SAMPLE_L / IMAGE_LOAD / IMAGE_SAMPLE_LZ / IMAGE_STORE (it reads register N the per-lane form did not pass) 194, EXEC as a number in the split form where some lanes are elsewhere 30, a value written while some lanes were elsewhere, read after they met again 27.

Not tested: current main or a branch with the open per-lane fixes (#2458's, #1889's); Windows; an AMD card; whether the two wave32 programs loop without end or only run very long (the driver gave up after ~5 s each time).

I can rerun on a commit you name. Without XCL_PER_LANE the same build runs this scene for 300 s (3–13 fps with placeholder textures).

AI use: found, measured and written with Claude Code (Claude Fable 5.2).

**@⁠voiceovarian1-max** on GitHub · 2026-11-26 04:59 UTC · [original](https://github.com/xcl-dev/xcl/issues/2647) **With `XCL_PER_LANE=1` the retail title (TitleID 7952987A, the one of #505) loses its device at the first world frames: the per-lane form of two wave32 compute programs does not finish on the GPU. With the per-lane form kept to wave64 programs there is no hang, but two small programs take 189 ms and 357 ms a call and the world runs at 0.5 fps.** **Setup:** #2057's head `4df1e6e` (on `main` `568e7db`, so without the per-lane fixes merged or opened since: #2117, #2128, #2503, #2321 …) plus local changes outside the recompiler. Linux 7.3, Proton Experimental's Wine, vkd3d-proton 3.1 with the XCL patch, RTX 4070 Ti 12 GB (driver 620.73.04), i7-14700K. `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PER_LANE=1 XCL_GPU_PROFILE=1`, Series S, runs of 120–200 s. The programs are named by `XCL_GPU_PROFILE`. | `[SHADER]` hash | Shape | With `XCL_PER_LANE=1` | Per-instruction form | |---|---|---|---| | `a2325a5828f82784` | CS, 32x1x1 threads, wave32, 9,508 B code; Dispatch of 17x1x1 groups | `RUNNING for 4411 ms and not finished`, Xid 109 (CTX SWITCH TIMEOUT), device removed at ~72 s | ~0.26 ms a call (8,810 calls) | | `6f2d17214d434d66` | CS, 32x1x1 threads, wave32, 12,676 B code; 36x1x1 groups | with the first one kept out: `RUNNING for 5811 ms and not finished`, device removed at ~74 s | ~0.8 ms a call | | `4ef76f69bf3b5606` | CS, 16x16x1 threads, wave64, 1,936 B code; 69x39x1 groups | 357 ms a call (122 calls, 43.5 s of GPU time in 200 s) | not in the top-15 lists | | `be7a084f47ea94d5` | CS, 16x16x1 threads, wave64, 1,300 B code; 69x39x1 groups | 189 ms a call (244 calls, 46.2 s) | not in the top-15 lists | - The first two rows are two runs: the second with a local switch that keeps one hash in the per-instruction form. The last two are a third run with a local switch that gives the per-lane form to wave64 programs only; that run had no hang and no GPU-wait timeout. - The programs that take most GPU time here did not get cheaper in that third run: `56c0cd3b82a00c6e` 9.8 ms a call (9.6 in the per-instruction form), `7bb2d0b9894ded7f` 20.0 ms (21.2), `a74706fb8f96ade9` 66 µs (72). - 788 program builds were refused by the per-lane form and fell back: `a branch on whether any lane of a mask is set, with lanes in EXEC without its bit` 215, `unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)` 207, `unsupported IMAGE_SAMPLE_L / IMAGE_LOAD / IMAGE_SAMPLE_LZ / IMAGE_STORE (it reads register N the per-lane form did not pass)` 194, `EXEC as a number in the split form where some lanes are elsewhere` 30, `a value written while some lanes were elsewhere, read after they met again` 27. **Not tested:** current `main` or a branch with the open per-lane fixes (#2458's, #1889's); Windows; an AMD card; whether the two wave32 programs loop without end or only run very long (the driver gave up after ~5 s each time). I can rerun on a commit you name. Without `XCL_PER_LANE` the same build runs this scene for 300 s (3–13 fps with placeholder textures). AI use: found, measured and written with Claude Code (Claude Fable 5.2).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:14:32 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.