Repository navigation
Conversation
…16/f64 Part of xcl-dev#2088 Part of xcl-dev#1269 Follow-up to xcl-dev#2080 in compute dispatch splitting (`dxil/module/split.rs`): - Run `dst.m.optimize()` before `dst.infer_piece_features()` and emit via `dst.finish_optimized(threads, Some(32))` so dead instructions eliminated by piece optimization (such as `createHandleFromHeap` whose index was packed for a later piece) never trigger stale feature flags. - Scan only live instructions in `self.m.blocks` and accurately re-infer piece-local flags to match DXC 1.9 `DxilShaderFlags`: `ResourceHeapIndexing`, `SamplerHeapIndexing`, `WaveOps`, `TiledResources` (`checkAccessFullyMapped` and non-undef, non-zero-constant sample LOD clamps), `TypedUavLoadAdditionalFormats` (multi-component typed UAV `textureLoad` and `bufferLoad`), `NativeLowPrecision`, `DoubleExtensions` (`dx.op.tertiary.f64` `Fma` op 47 in addition to `infer_type_features`), and 64-bit atomics. - Support `TypeDef::Half` (1 scratch word via `bitcast half <-> i16` plus `zext`/`trunc`) and `TypeDef::Double` (2 scratch words via `split_double` / `make_double`) in `transport_words`, `pack`, and `unpack`. - Add regression tests verifying per-piece feature pruning under DXC 1.9 and bit-for-bit GPU execution of live `f16` and `f64` values crossing cuts. Assisted-by: Google Antigravity (Gemini 4 Neon)
|
Tested: current PR head merged onto current One red on this lane: the new transports test crashes inside
Reading: something in the new split-chain piece transport builds a pipeline shape this Linux stack (patched vkd3d-proton 3.1 + Mesa 26.2.5 + RADV) faults on inside the D3D12core shim. I cannot say from a stripped backtrace whether the faulting code is XCL's vkd3d-proton patch or upstream vkd3d-proton; a debug-pdb run on a Wine/Proton bot would pin it. Addresses are module-relative offsets into the vkd3d-proton 3.1 XCL-patched Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
|
Independent AMD Radeon (native wave64) verification of exact head Tested
Regression run ( PR: Not tested
AI use
|
|
Diff review on 1f70e67 (infer_piece_features after optimize + live 16/64 transport in split.rs): clean change on the compiler side and Windows native checks are green, but holding merge until the deterministic d3d12core.dll access violation reported on dispatch_chain_transports_live_f16_and_f64_across_cuts under Wine/vkd3d-proton is diagnosed and resolved. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Test report on an NVIDIA card (Windows, retail title). Tested
Not tested
AI use MiniMax Code (MiniMax-M3.1-Flash) built the commits, ran the test suite and the smoke runs, and wrote this report from the real output. |
|
|
|
Independent test and smoke report for head Tested
Regression run (
PR Not tested: NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window. AI use: Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting. |
Part of #2088
Part of #1269
What is in it
Follow-up to #2080 in compute dispatch splitting (
crates/xcl/src/gpu/dxil/module/split.rs) fixing two classes of shaders that were previously refused during splitting and fell back to compiling whole:make_piece,infer_piece_features):dst.m.optimize()beforedst.infer_piece_features()and emit pieces viadst.finish_optimized(threads, Some(32))instead of inferring flags before optimization and scanning deadself.m.instsentries. Whenpacktransports only a heap handle's dynamic index to a later piece,dst.m.optimize()eliminates the now-deaddx.op.createHandleFromHeapin the defining piece, soResourceHeapIndexing/SamplerHeapIndexingare no longer spuriously declared there.self.m.blocks.iter().flatten()and re-infer piece-local flags to match DXC 1.9 (DxilShaderFlags):ResourceHeapIndexing,SamplerHeapIndexing,WaveOps(dx.op.wave*/dx.op.quad*),TiledResources(dx.op.checkAccessFullyMappedand sample ops with a non-undef, non-zero-constant LOD clamp),TypedUavLoadAdditionalFormats(multi-component typed UAVdx.op.textureLoad*/dx.op.bufferLoad*viaannotateHandleproperties, with fallback),NativeLowPrecision(kept only when the whole shader used it and the piece has livehalf/i16instructions),DoubleExtensions(dx.op.tertiary.f64Fmaop 47 in addition tofinish_optimized'sinfer_type_features), and 64-bit atomics.f16andf64transport across cuts (transport_words,pack,unpack):TypeDef::Halfin 1 scratch word (bitcast half -> i16+zext i16 -> i32, restored viatrunc i32 -> i16+bitcast i16 -> half) andTypeDef::Doublein 2 scratch words (Shader::split_double/Shader::make_double).split::tests):dispatch_chain_prunes_piece_local_features_after_optimize: pure-CPU + DXC 1.9 validator test covering clampedsample_grad(0.5settingTiledResourcesand0.0clearing it per DXC 1.9hasSampleClamp) with a dead entry heap handle eliminated byoptimize(), plus split-wave64 isolation ofWaveOps,NativeLowPrecision, andDoubleExtensions(Tertiary::Fmaop 47).dispatch_chain_transports_live_f16_and_f64_across_cuts: DXC 1.9 validation of a 3-piece chain where livef16(including-0.0f16) andf64cross cuts over an intermediate piece that uses neither type, plusskip_test-guarded bit-for-bit GPU readback against the unsplit shader and CPU reference.Tested
1.9.2609.5):0 passed, 2 failed—dispatch_chain_prunes_piece_local_features_after_optimizerefused piece 1 of 2 (error: Flags must match usage.) anddispatch_chain_transports_live_f16_and_f64_across_cutsreturnedNonefromsplit_compute(transport_wordsrejectedHalf/Double).cargo test --release -p xcl --lib gpu::dxil::module::split::tests -- --test-threads=1 --nocaptureon NVIDIA GeForce RTX 4060 (driver621.14, DXC1.9.2609.5):10 passed, 0 failed, 0 ignored(1.14 s,0skipped).XCL_ADAPTER=warpcargo test --release -p xcl --lib gpu::dxil::module::split::tests -- --test-threads=1 --nocapture:10 passed, 0 failed, 0 ignored(0.03 s); pure-CPU/DXC 1.9 tests (dispatch_chain_prunes_piece_local_features_after_optimize,dispatch_chain_declares_typed_uav_loads_only_where_they_are,oversized_loop_occupies_one_piece_up_to_the_hard_ceiling) ran with0skips, anddispatch_chain_transports_live_f16_and_f64_across_cutsvalidated all 3 split pieces + whole shader with DXC 1.9 before skipping GPU execution (SKIPPED: no wave32 GPU).CreateComputePipelineStatetimings (fresh-named.execopies per mode with unique bytecode salt, verified cold by immediate 2nd warm call, on synthetic 16-loop shaders that0829441refused to split):tiled_clamp(hasha1baa443fcac1d43,1,465DXIL insts,16,996B whole ->6pieces): whole cold53.78 ms(warm0.411 ms) vs parallel 6-piece cold wall28.23 ms(max piece27.54 ms, sum90.97 ms, max warm1.147 ms) —1.91xfaster cold wall (-47.5%).live_f16_f64(hash95eb3b58dad86457,1,470DXIL insts,17,008B whole ->6pieces): whole cold37.18 ms(warm0.375 ms) vs parallel 6-piece cold wall20.50 ms(max piece19.48 ms, sum87.19 ms, max warm0.359 ms) —1.81xfaster cold wall (-44.9%).cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocaptureon RTX 4060):23test binaries,1274 passed, 0 failed, 46 ignored;28pre-existing hardware/debug-layerSKIPPEDlines (0insplit::tests):21no wave64(RTX 4060 is wave32-only),3per-lane form: refused(lower_dxil::testswave32 per-lane),2no D3D12 debug layer/no d3d12SDKLayers.dll,1cannot disable the driver cache(shaders::tests::pso_measurement_compiles_an_exact_synthetic_record),1no heap windows(heap_window_out_of_memory_falls_back_to_the_switch_form).Regression run
Base (
origin/main082944135cd2b96288470a595861fa608eee08dc):PR head (
1f70e6796fbd0a8e893d264497135a8235607321):Not tested
Native16BitShaderOpsSupported.d3d12SDKLayers.dllis not installed on this host).AI use
Google Antigravity (Gemini 4 Neon) assisted with checking DXC 1.9
DxilShaderFlagsrules, implementing per-piece feature inference andf16/f64transport insplit.rs, adding regression tests, and running the verification suite and cold-PSO benchmarks.