Repository navigation
Conversation
When a driver compile hangs the GPU, the D3D12 device of the pass is removed and every later CreateRootSignature / CreateComputePipelineState fails. The pass counted each of those as refused and went on, so a run ended with thousands of "refused" pipelines and no hint of why. On an RX 6700 XT (RDNA2) with XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 this happened right after the retail title's two screen-probe programs of about 3 MB of DXIL; GetDeviceRemovedReason was DXGI_ERROR_DEVICE_HUNG, and the ~2 200 pipelines after them were reported as refused. After a failure the pass now asks GetDeviceRemovedReason. Once it says the device is gone, it prints the reason and the program whose pipeline failed first, makes no more pipelines (translation goes on), and counts the rest apart from the refusals in its summary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Code review on
Remaining before merge: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a driver compile hangs the GPU, the D3D12 device of
xcl shaders --precompile --pipelinesis removed, and everyCreateRootSignature/CreateComputePipelineStateafter it fails. The pass counted each of those as refused and went on, so it ended with thousands of "refused" pipelines and nothing saying why. On an RX 6700 XT withXCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1this happened right after a retail title's two screen-probe programs of about 3 MB of DXIL:GetDeviceRemovedReasongaveDXGI_ERROR_DEVICE_HUNG, and the 2 222 pipelines after them were reported as refused (466 made). Part of #1269.What is in it
crates/xcl/src/shaders.rs: after a failed root signature or pipeline,Pipelines::note_removedasksGetDeviceRemovedReason. The first time it says the device is gone, the pass prints the reason and the program whose pipeline failed first ("seen when making …": with several pipelines made at once, not necessarily the one that hung the GPU). From then on no pipeline is made (translation goes on), and those are counted apart from the refusals; the summary has a line for them.maketakes the program's name for the message.Tested
c0ae0e9(this commit onmain568e7db).cargo test --workspace --no-fail-fast -- --test-threads=4: 1150 passed, 4 failed, 46 ignored. Onmain(cbc296a, same crates as568e7db) in the same session: 1149 passed, 5 failed, 46 ignored. The 4 fail on both:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 540, Tests: reduce fuzz seed 540, an RDNA2-only sext i1 -> i64 failure #2170),hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory(Tests: align XMemVirtualQuery buffers and verify CPU flags #650), and the e2e teststest_title_runs_and_game_folder_is_untouched,test_title_draws_with_a_root_signature_under_the_debug_layer;main's fifth,vram::tests::d32s8_targets_take_their_own_size_of_video_memory, passed here. SKIPPED on both: the six per-lane cases off16_programs_on_the_gpu/f32_programs_on_the_gpu(refused),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).GetDeviceRemovedReasonafter a refused pipeline, is the one a local diagnostic build used to find the cause above: it printedDXGI_ERROR_DEVICE_HUNGfor the first pipeline refused after the probe programs.Regression run
scripts/smoke.ps1, 60 s, release builds, run in the same session.main:
PR:
Not tested
ALLOW_RETURNING_EXISTING_DEVICE), soID3D12Device5::RemoveDevicein a test would remove the device of every other GPU test in the process.xcl shaders).AI use
🤖 Generated with Claude Code