DXC helper output fails DXV on large compute programs, and the reason isn't logged #592

Closed
opened 2026-11-30 16:34:37 +00:00 by JeffreyBytes · 4 comments
JeffreyBytes commented 2026-11-30 16:34:37 +00:00 (Migrated from github.com)
Contributor

Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-11-30T16:34:37Z.


During a cold --prepare-only of ProjectScarlett on main, DXV rejected the DXC helper's output for 16 programs, and each one was compiled again with the dxc command line. The prep summary still says 0 failed, and the log doesn't say why DXV refused the output.

Setup: main at 8345699c, built with build.py. Microsoft's Linux DXC 1.9.2609.5, with the helper the launcher builds itself. A copy of a real prefix with 36,712 recorded requests, empty shader caches, and the default job count (15 here). Nothing was overridden.

What happened: the log has 16 lines like this:

Persistent DXC output rejected, using the CLI: dxv failed (1):
  • 13 are dxv failed (1) with nothing after the colon.
  • 3 are DXV running past its 10 s limit (Command '[.../dxv', '.../out.cso']' timed out after 10 seconds).
  • 7 of the dxv failed happened during the main pass. The other 9 (6 failures and the 3 timeouts) happened during the slow-shader pass, so they're the largest programs: compute programs with 2–4 MB of DXIL.
  • The command line's output passed DXV every time. The prep ended with 35476 compiled, 0 cached, 1236 unsupported, 0 failed, so no shader is missing. The cost is an extra command-line compile of a large program each time, plus the helper compile that was thrown away.

I saw the same 13 dxv failed on a second run with a modified helper, so this doesn't look like a one-off.

Why the reason is missing: run_tool in project_tuxbox/shader_prep.py sends stdout to DEVNULL and keeps only stderr. DXV prints its errors on stdout and exits 1 with stderr empty. I checked that with a truncated container: stdout had the error, and stderr was empty. So for these 13 programs we don't know what DXV objected to.

What I haven't done: I haven't reproduced it on a single program. The prep doesn't keep the HLSL, and the log doesn't name the request, so I can't tell which programs they were. The helper keeps value names and leaves the container digest empty (the DXC helper section of docs/PROJECTSCARLETT.md), so its files are larger. That could explain the timeouts, but I haven't measured it.

Things that would make it easier to track down:

  • Keep DXV's stdout in the error, so the log says what failed validation.
  • Name the request key in the "Persistent DXC output rejected" line.
  • Count these fallbacks in the prep summary, so a run with them doesn't look identical to one without.
<!-- greyfinch-sync:brcly/TuxBox:issue:6701184601 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/592). Originally posted by [JeffreyBytes](https://github.com/JeffreyBytes) on 2026-11-30T16:34:37Z. --- During a cold `--prepare-only` of ProjectScarlett on main, DXV rejected the DXC helper's output for 16 programs, and each one was compiled again with the `dxc` command line. The prep summary still says 0 failed, and the log doesn't say why DXV refused the output. **Setup:** main at 8345699c, built with `build.py`. Microsoft's Linux DXC 1.9.2609.5, with the helper the launcher builds itself. A copy of a real prefix with 36,712 recorded requests, empty shader caches, and the default job count (15 here). Nothing was overridden. **What happened:** the log has 16 lines like this: ``` Persistent DXC output rejected, using the CLI: dxv failed (1): ``` - 13 are `dxv failed (1)` with nothing after the colon. - 3 are DXV running past its 10 s limit (`Command '[.../dxv', '.../out.cso']' timed out after 10 seconds`). - 7 of the `dxv failed` happened during the main pass. The other 9 (6 failures and the 3 timeouts) happened during the slow-shader pass, so they're the largest programs: compute programs with 2–4 MB of DXIL. - The command line's output passed DXV every time. The prep ended with `35476 compiled, 0 cached, 1236 unsupported, 0 failed`, so no shader is missing. The cost is an extra command-line compile of a large program each time, plus the helper compile that was thrown away. I saw the same 13 `dxv failed` on a second run with a modified helper, so this doesn't look like a one-off. **Why the reason is missing:** `run_tool` in `project_tuxbox/shader_prep.py` sends stdout to `DEVNULL` and keeps only stderr. DXV prints its errors on stdout and exits 1 with stderr empty. I checked that with a truncated container: stdout had the error, and stderr was empty. So for these 13 programs we don't know what DXV objected to. **What I haven't done:** I haven't reproduced it on a single program. The prep doesn't keep the HLSL, and the log doesn't name the request, so I can't tell which programs they were. The helper keeps value names and leaves the container digest empty (the DXC helper section of `docs/PROJECTSCARLETT.md`), so its files are larger. That could explain the timeouts, but I haven't measured it. Things that would make it easier to track down: - Keep DXV's stdout in the error, so the log says what failed validation. - Name the request key in the "Persistent DXC output rejected" line. - Count these fallbacks in the prep summary, so a run with them doesn't look identical to one without.
NickStallman commented 2026-11-30 18:41:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T18:41:34Z.


@JeffreyBytes one cause we can show, though I can't say it is yours: on main (a564e8c0), three of the large volumetrics programs #546 accepts fail DXC itself with the helper's options (-O1 -disable-lifetime-markers -fnew-inlining-behavior, DXC 1.9.2609: exit 5, validation, "Instructions must be of an allowed type"), because tb_f64_unpack leaves a vector merge in vector form. #593 (draft) computes it as two scalars; with it the same three pass dxv in 4, 8 and 42 s. Compute programs with soft FP64 are the only ones it touches (17 requests per host here).

If you still have that setup, the count to look at is the number of "Persistent DXC output rejected" lines with and without #593. If your 13 aren't FP64 programs, it won't change them, and the reason is something else; your point about keeping dxv's stdout in the error would tell.

<!-- greyfinch-sync:brcly/TuxBox:comment:7288225368 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/592#issuecomment-7288225368). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-30T18:41:34Z. --- @JeffreyBytes one cause we can show, though I can't say it is yours: on main (a564e8c0), three of the large volumetrics programs #546 accepts fail DXC itself with the helper's options (`-O1 -disable-lifetime-markers -fnew-inlining-behavior`, DXC 1.9.2609: exit 5, validation, "Instructions must be of an allowed type"), because `tb_f64_unpack` leaves a vector merge in vector form. #593 (draft) computes it as two scalars; with it the same three pass `dxv` in 4, 8 and 42 s. Compute programs with soft FP64 are the only ones it touches (17 requests per host here). If you still have that setup, the count to look at is the number of "Persistent DXC output rejected" lines with and without #593. If your 13 aren't FP64 programs, it won't change them, and the reason is something else; your point about keeping `dxv`'s stdout in the error would tell.
JeffreyBytes commented 2026-11-30 21:00:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-11-30T21:00:41Z.


@NickStallman yes, they're all FP64 programs, and #593 clears them, the timeouts included.

I translated all 5,922 compute requests from my ProjectScarlett cache at 8345699c. 17 of them use tb_f64_unpack, all cs_6_6. I compiled those through the DXC helper with the runtime flags (-O1 -disable-lifetime-markers -fnew-inlining-behavior, DXC 1.9.2609.5) and ran dxv on each with no time limit. All 17 fail with "Instructions must be of an allowed type" at an insertelement <2 x i32>. dxv takes 1.8 to 15.4 s to reject them, and four take over 10 s. Those four are the "timed out after 10 seconds" lines, and the rest are the dxv failed (1) ones. A cold full prep gives me 21 or 22 "Persistent DXC output rejected" lines per run (8 timeouts, 13 or 14 failures), on main with the stock helper as well as on my local helper changes, so a longer dxv limit wouldn't help: they fail validation either way.

With #593 (6fb04f1b) I translated the same 17 requests again and compiled them the same way. All 17 pass dxv, in 0.1 to 0.4 s each.

17 programs before #593
dxv 17 fail, 107.0 s total 17 pass, 4.7 s total
DXC (helper) 318.3 s 312.1 s
DXIL size 0.997x

The HLSL grows by 200 bytes per program. I didn't see the 4 to 42 s dxv times you got. Here the largest (4.0 MB of DXIL) validates in 0.4 s, and I don't know where the difference comes from.

One of the 17, request e8570a69… (CS 3f81993d), is the compute program that sat in CreatePipelineState for 636 s during the loading screen of a cold game run here (RX 6700 XT, RADV, GE-Proton11-14, before the 11-15 pin). I haven't rerun the game with #593 or on 11-15, so I can't say yet how much of that goes away. I also haven't done a full prep with #593, only these 17 programs.

<!-- greyfinch-sync:brcly/TuxBox:comment:7291787114 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/592#issuecomment-7291787114). Originally posted by [JeffreyBytes](https://github.com/JeffreyBytes) on 2026-11-30T21:00:41Z. --- @NickStallman yes, they're all FP64 programs, and #593 clears them, the timeouts included. I translated all 5,922 compute requests from my ProjectScarlett cache at 8345699c. 17 of them use `tb_f64_unpack`, all `cs_6_6`. I compiled those through the DXC helper with the runtime flags (`-O1 -disable-lifetime-markers -fnew-inlining-behavior`, DXC 1.9.2609.5) and ran `dxv` on each with no time limit. All 17 fail with "Instructions must be of an allowed type" at an `insertelement <2 x i32>`. `dxv` takes 1.8 to 15.4 s to reject them, and four take over 10 s. Those four are the "timed out after 10 seconds" lines, and the rest are the `dxv failed (1)` ones. A cold full prep gives me 21 or 22 "Persistent DXC output rejected" lines per run (8 timeouts, 13 or 14 failures), on main with the stock helper as well as on my local helper changes, so a longer `dxv` limit wouldn't help: they fail validation either way. With #593 (6fb04f1b) I translated the same 17 requests again and compiled them the same way. All 17 pass `dxv`, in 0.1 to 0.4 s each. | 17 programs | before | #593 | |---|---:|---:| | `dxv` | 17 fail, 107.0 s total | 17 pass, 4.7 s total | | DXC (helper) | 318.3 s | 312.1 s | | DXIL size | | 0.997x | The HLSL grows by 200 bytes per program. I didn't see the 4 to 42 s `dxv` times you got. Here the largest (4.0 MB of DXIL) validates in 0.4 s, and I don't know where the difference comes from. One of the 17, request `e8570a69…` (CS `3f81993d`), is the compute program that sat in `CreatePipelineState` for 636 s during the loading screen of a cold game run here (RX 6700 XT, RADV, GE-Proton11-14, before the 11-15 pin). I haven't rerun the game with #593 or on 11-15, so I can't say yet how much of that goes away. I also haven't done a full prep with #593, only these 17 programs.
NickStallman commented 2026-11-30 21:19:50 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T21:19:50Z.


@JeffreyBytes thank you, that settles it: all 17 are FP64 programs, and #593 clears them, the timeouts included. On your last point: the 4, 8 and 42 s in #593's table are the DXC compile followed by dxv on one core, measured together, not dxv alone. I wrote "passes, 4 s", which reads as if it were the validator; I've changed the description. Your separate numbers are the ones to use.

<!-- greyfinch-sync:brcly/TuxBox:comment:7292248656 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/592#issuecomment-7292248656). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-30T21:19:50Z. --- @JeffreyBytes thank you, that settles it: all 17 are FP64 programs, and #593 clears them, the timeouts included. On your last point: the 4, 8 and 42 s in #593's table are the DXC compile followed by `dxv` on one core, measured together, not `dxv` alone. I wrote "passes, 4 s", which reads as if it were the validator; I've changed the description. Your separate numbers are the ones to use.
JeffreyBytes commented 2026-12-01 00:22:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-12-01T00:22:35Z.


Closing this as fixed by #593. All 16 rejections were the FP64 programs, and with #593 all 17 of them pass dxv. A cold prep of a random 4,000 recorded requests on 82109205 (with #593) logged no "Persistent DXC output rejected" lines, with either helper. I haven't repeated the full-cache prep since #593.

The logging points at the end aren't addressed: run_tool still discards dxv's stdout, so a future validation failure would again show up as dxv failed (1): with no reason. That's small enough to pick up separately if it's wanted.

<!-- greyfinch-sync:brcly/TuxBox:comment:7296262187 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/592#issuecomment-7296262187). Originally posted by [JeffreyBytes](https://github.com/JeffreyBytes) on 2026-12-01T00:22:35Z. --- Closing this as fixed by #593. All 16 rejections were the FP64 programs, and with #593 all 17 of them pass `dxv`. A cold prep of a random 4,000 recorded requests on 82109205 (with #593) logged no "Persistent DXC output rejected" lines, with either helper. I haven't repeated the full-cache prep since #593. The logging points at the end aren't addressed: `run_tool` still discards `dxv`'s stdout, so a future validation failure would again show up as `dxv failed (1):` with no reason. That's small enough to pick up separately if it's wanted.
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
brcly/TuxBox#592
No description provided.