Repository navigation
Conversation
…v#1805) Part of xcl-dev#1805. Assisted-by: Antigravity (Gemini 4 Hydrogen)
|
Independent bounded-stack tests on Proton / Wine I ran the two published 2 MiB stack cases individually on base
Both base runs logged Tested
These results cover the synthetic compiler tests on this PR. The retail replay was made with #759 to reproduce the worker loss separately. Retail reproduction on #1805 AI use — OpenAI Codex (GPT-6, exact variant unavailable) ran the tests, checked the logs, and drafted this report. |
…to ethans-superbuild dxil/kernel.rs: its test module follows geom_init. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
A note from #1805's reporter: the AI use
|
lewisnic94-max
left a comment
There was a problem hiding this comment.
[P2] Excessive dependency walker memory allocation
At line 868, each pending load copies the full store list for its pointer root. A 1,024-step pixel shader retained 1,050,625 copied entries.
Borrowing the list preserved traversal depth and byte-identical DXIL while reducing median additional peak commit inside compute_deps from 16.621 to 0.727 MiB across seven release runs.
Please keep a cursor into the shared list and add a regression test for live child storage.
AI-assisted validation by Codex (GPT-6).
|
Two contributors checked independently and found that #1844 solves the same problem (for #1805) in a different way: #1607, group D70. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table. |
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
Convert
Ssa::readand sibling CFG/SSA walkers incrates/xcl/src/gpu/dxil/from call-stack recursion to explicit heap-allocated worklists/loops so large programs with long sequences of join blocks do not overflow the thread stack. Part of #1805.What is in it
crates/xcl/src/gpu/dxil/ssa.rs: convertSsa::readfrom call-stack recursion to an explicit heap-allocated frame stack (Vec), preserving single-predecessor chain caching, loop-phivisitingmarkers, operand ordering, and trivial-phi elimination; add bounded-stack (2 MiB) synthetic tests for 4,000 sequential if/else diamonds and 3,000 region joins with a loop phi.crates/xcl/src/gpu/dxil/kernel.rs: add a bounded-stack (2 MiB) full direct-DXIL compile test (deep_branch_chain_compiles_on_bounded_stack) with 4,000 sequential conditional branches.crates/xcl/src/gpu/dxil/graphics.rs,crates/xcl/src/gpu/dxil/graphics_tests.rs: convert mutually recursiveblock_deps/value_depsincompute_depsto an explicit heap-allocated stack (eval_dep), with a bounded-stack (2 MiB) 4,000-phi pixel-shader dependency test.crates/xcl/src/gpu/dxil/module/opt.rs: replace tail recursion inis_const_global_ptrwith a loop.Tested
32.0.15.9144), AMD Ryzen 5 7500F 6-Core Processor, Windows build 26200.9974 (25H2),rustc 1.100.0 (0ef1bc386 2026-11-09), debug (cargo test) & release (cargo build --release -p xcl).gpu::dxil::ssa::tests::deep_join_chain_does_not_overflow_stackandgpu::dxil::kernel::tests::deep_branch_chain_compiles_on_bounded_stackboth exited with0xc00000fd(STATUS_STACK_OVERFLOW).cargo test -p xcl --lib gpu::dxil -- --test-threads=4: 88 passed, 0 failed, 1 ignored (dump_dxc_lowering).$env:XCL_DIRECT_DXIL = "1"; cargo test -p xcl --lib gpu::recomp::tests::gpu_ -- --test-threads=4: 87 passed, 1 failed (gpu_clamp_and_omod_per_instructiononv_pk_add_i16 clamp, which also fails identically onmain1d027e5), 1 ignored, 1SKIPPED(gpu_wave32_program_in_wave64_hardware: no wave64).cargo test -p xcl --lib -- --test-threads=4: 913 passed, 1 failed (gpu_clamp_and_omod_per_instruction, pre-existing onmain1d027e5), 23 ignored (SKIPPEDGPU tests: 20 wave64 / unsupported per-lane f16/f32 tests;shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: Windows Developer Mode required).cargo test -p xcl --test '*' -- --test-threads=4: 49 passed, 0 failed, 20 ignored (SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows).Regression run
main:
PR:
Not tested
no wave64on RTX 3060).shaders::tests::pso_measurement_compiles_an_exact_synthetic_record(Windows Developer Mode required to disable driver cache) andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).xcl(cargo test --workspacewas not run; rancargo test -p xcl --libandcargo test -p xcl --test '*').AI use
gpu/dxil/recursion, convertedSsa::read,compute_deps, andis_const_global_ptrto iterative implementations, added the bounded-stack synthetic tests, ran the test suites and smoke checks, and drafted this PR description.