D3D12.X: a huge compute program the driver refuses is logged with its verdict #1908
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1918"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by Rednaxeh on 2026-11-24T23:06:38Z.
When the driver refuses a translated compute pipeline, the only trace was
note_translation_error: the report'stranslation_errors, or the notes of a cached-only attempt, which are dropped when a shader was still missing. On an RX 7800 XT a retail title's 13.8 MB compute program (#1332 in the form of #1321) takes the driver 15–23 s and ~15 GB of commit in every run and is refused with E_OUTOFMEMORY;xcl.logshowed itsdriver compile finishline and, a millisecond later, the title's dispatch with that pipeline skipped, with nothing in between. The same with the 3.9 MB form of the direct DXIL backend (#1748). The verdict had to be taken fromxcl shaders --measure-pso. Part of #232 / #505.What is in it
crates/xcl/src/hle/d3d12x/real.rs: a huge compute program (huge_pso_bytesand up) the driver refuses is logged with its record hash, DXIL size, driver-cache file name (<fnv64(DXIL)>-<len>-<flags>.pso, so the line matches the blob cache too), HRESULT and the time the driver took, next to thedriver compile start/finishlines it already has. Logging only; no behaviour changes, no test (AGENTS.md: logging needs none).README.md: one sentence under the huge-pipeline paragraph.Tested
stable-x86_64-pc-windows-msvc, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug for the tests, release for the titlecargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4on79fde18(--no-fail-fast, 20 test binaries): 974 passed, 1 failed, 45 ignored. The failure,gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722: res[30] = 0x1, CPU 0x7fffffff), fails identically onmain689f2dbon this card: the direct DXIL backend, not this PR.gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpuandf32_programs_on_the_gpu(the per-lane form refusesV_MUL_F16/V_PK_MUL_F16/V_CVT_F16_F32),heap_window_out_of_memory_falls_back_to_the_switch_form.79fde18with no input: the two programs the preload builds at start are now answered inxcl.log:Regression run
Not tested
AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by Melow-code on 2026-11-24T23:10:49Z.
Review: COMMENTED
Logging the driver's rejection verdict for huge compute programs is useful for debugging. Make sure the log line includes the PSO hash or shader key so it can be matched to the cache.
Imported from ivall/xcl. Originally posted by Rednaxeh on 2026-11-24T23:32:57Z.
Thanks. The line had the console record's hash (the one in
driver compile startandxcl shaders --measure-pso); the driver-blob cache is keyed by the translated DXIL instead (<fnv64(DXIL)>-<len>-<flags>.pso), so I added that file name next to it in79fde18:Suite and smoke rerun on the new head are in the description.
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T23:55:26Z.
Full-suite run, since this PR has no test report yet. Tested exact head
79fde18(on its base689f2db).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests: 965 passed, 0 failed, 43 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.#[test]functions in the diff.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 974 passed, 0 failed, 45 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main62265d3too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651) and the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests (follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:54:25Z.
Code review on
79fde18:recordhash, DXIL byte size,driver_cache::name(&dxil, copy.Flags.0), HRESULT verdict, and driver time whendxil.len() >= huge_pso_bytes()fails intranslated_compute_pso_once(crates/xcl/src/hle/d3d12x/real.rs) makes rejected huge compute PSOs immediately diagnosable inxcl.log.CIworkflow approved (running).Remaining before merge:
Build and testfinishing green plus AMD verification on79fde18.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T02:26:04Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.Thanks!