Tests: cover Direct DXIL Module::optimize passes and GPU execution #1842
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1842
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1842"
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?
@microwave805 on GitHub · 2026-11-24 21:42 UTC · original
microwave805:tests-gpu-dxil-opt→main· +350 −0 · 1 files · 1 commits · openAdd standalone integration and GPU tests for the Direct DXIL module optimizer (
crates/xcl/src/gpu/dxil/module/opt.rs), which currently has no dedicated unit or integration tests.What is in it
crates/xcl/tests/gpu_dxil_opt.rs:opt_constant_folding_and_identities_validate_and_run: verifies 32-bit constant folding (AShr,UDiv,URem,SExt,SLt,Add,Xor,Select) and algebraic identities (+0,&~0,*1,*0,x^x,select(c, x, x),bitcast(bitcast(x)),cmp(x, x)), checking DXIL disassembly and wave32 GPU execution against CPU values.opt_cse_merges_dominators_isolates_siblings_and_keeps_wave_is_first_lane: verifies dominator-tree CSE across child blocks, sibling-branch undo-stack isolation, same-blockwaveActiveBallotCSE without hoisting across a divergent branch (verified on GPU viawaveActiveBallot(true)returningodd_maskinstead of0xFFFF_FFFF), andwaveIsFirstLaneremaining unmerged.opt_prunes_unreachable_blocks_and_collapses_trivial_phis: verifies unreachable-block pruning and second-pass trivial-phi collapse after CSE unifies diamond arms, plus GPU execution.opt_dce_drops_dead_32bit_ops_but_preserves_64bit_flags: verifies DCE removes dead 32-bit ops while retaining deadi64/f64ops soInt64Ops/Doublesshader flags stay consistent under DXC validation.opt_leaves_malformed_use_before_def_for_writer_to_reject: verifiesuses_well_formedleaves malformed forward-reference IR untouched sotry_to_bitcodestill reports an error.Tested
stable-x86_64-pc-windows-msvc, debug)7753368(based onmainc4d37be):cargo test -p xcl --test gpu_dxil_opt -- --nocapture: 5 passed, 0 failed, 0 ignored (0 skipped).\scripts\test.ps1(cargo build --workspace && cargo test --workspace -- --test-threads=4): 964 passed, 0 failed, 43 ignoredgpu_dxil_opt): 18×no wave64(lower::tests,lower_dxil::tests,recomp::tests), 3×per-lane form: refused(lower_dxil::tests:f16 arithmetic,f16 packed,f32 conversions), 1×no heap windows(heap_window_out_of_memory_falls_back_to_the_switch_form), 1×cannot disable the driver cache(shaders::tests::pso_measurement_compiles_an_exact_synthetic_record)Regression run
crates/xcl/tests/gpu_dxil_opt.rs(no runtime or build-input files changed).Not tested
AI use
crates/xcl/src/gpu/dxil/module/opt.rs, wrotecrates/xcl/tests/gpu_dxil_opt.rsand this PR description, and ran the verification commands above.@DarkPanda69 on GitHub · 2026-11-24 22:40 UTC · original
AMD run with native 64-lane waves, which this PR lists as not tested, plus an NVIDIA one.
Tested: pass, head
7753368applied onmain689f2db, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.cargo test -p xcl --test gpu_dxil_opt -- --test-threads=4withXCL_ADAPTERset to each GPU:cargo test -p xcl --lib -- gpu::recomp --test-threads=4with this PR applied: 261 passed, 0 failed, 18 ignored on both; the SKIPPED lines are the same as onmain.Not tested: Intel; Linux / Wine; the whole workspace suite.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@futurepro62 on GitHub · 2026-11-24 22:40 UTC · original · edited 2026-11-24 22:57 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
7753368(on its basec4d37be).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: 959 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.opt_constant_folding_and_identities_validate_and_run,opt_cse_merges_dominators_isolates_siblings_and_keeps_wave_is_first_lane,opt_prunes_unreachable_blocks_and_collapses_trivial_phis,opt_dce_drops_dead_32bit_ops_but_preserves_64bit_flags,opt_leaves_malformed_use_before_def_for_writer_to_reject.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 964 passed, 0 failed, 43 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 five tests where this PR's base has them. They fail on main689f2dbtoo, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures. These areheap_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). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 01:15 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@JJAutoCompare on GitHub · 2026-11-25 03:22 UTC · original
Tested
PR #1842 was open at
775336821f5c95ecb329a4c06a8a5e14670cdac9before and after testing. The assigned checkout was clean and detached at that SHA for the run. The PR description and three discussion comments showed no equivalent Arc A770 result.STOR-WINLAB ran Windows 11 Enterprise Evaluation 25H2 (26200.9974), AMD Ryzen 7 3800X, and Intel Arc A770 (driver 32.0.101.9175). Rust and Cargo were 1.100.0, host
x86_64-pc-windows-msvc. Each fixture reported DXC and DXIL 1.9.2609.5.cargo test -p xcl --locked --test gpu_dxil_opt --no-runbuilt successfully outside the GPU mutex. The unoptimized build usedCARGO_BUILD_JOBS=2,CARGO_INCREMENTAL=0,CARGO_PROFILE_DEV_DEBUG=0, andCARGO_PROFILE_TEST_DEBUG=0.CARGO_TARGET_DIR=L:/XclTooling/pr1947-1831ec4-t3-97236edf/target,TEMP=TMP=L:/XclTooling/pr1842/tmp,XCL_ADAPTER=A770, andXCL_DXC_DIR=$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64.All three exact invocations exited 0. The checked-in DXIL validation and GPU result assertions passed with 3 passed, 0 failed, 0 ignored, 0 hardware skips, and 0 validator skips. The GPU mutex was released and the assigned Cargo target is available.
Not tested
Other fixtures, the workspace suite, retail titles, and other adapters or drivers.
AI use
T3 Code / Codex
gpt-6.2-solran the commands, checked the logs, and prepared this report.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.