Repository navigation
Conversation
|
Review (head 03d8ade, diff read, not a merge-check):
Fine: function records mark helpers internal and non-proto. Bodies follow the entry in declaration order, as the LLVM 3.7 reader expects. BLOCKINFO abbreviations are defined before any local ones, so their IDs match. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
Diff review (head Clean
AI use: Antigravity (Gemini 4 Neon) audited the full diff against |
|
merge-check AI-written and posted by Foniass without a human check of each point. |
|
With this PR in, This was found on our integration branch, which carries this PR at The translated module looks right: disassembled, each Not tested: AI use: Claude Code (Claude Opus 5.5) ran the bisect and wrote this comment. |
Rebase helper outlining directly onto main (reusing xcl-dev#3655's HelperBody representation) and outline repeated direct-DXIL helper sequences into shared internal functions with inherited BLOCKINFO function abbreviations: - Heap raw buffer loads: xcl.sbuf.word, xcl.sbuf.word2, xcl.sbuf.word4, and xcl.raw.word4, reusing private alloca output slots for multi-word results in whole-entry dispatches. - Dynamic buffer format decode: xcl.fmt.decode (leaving fmt_encode, scalar_flat_read, and f16 RNE rounding inline). - Arithmetic and address helpers: xcl.mul.legacy, xcl.fmad.words, and xcl.read.carry. - Optimizer and dispatch-splitter accounting: treat all four heap-load helpers as DCE-removable and raw-load flagged, infer ResourceHeapIndexing for them across split pieces, and charge every outlined HelperBody against dispatch_block_cost. - Opt-out switch: XCL_DXIL_OUTLINE=0 keeps all outlined helpers inline and appends xcl-dxil-outline-0 to the translator cache tag. Co-Authored-By: Codex (GPT-6) Co-Authored-By: Antigravity (Gemini 4 Neon)
03d8ade to
29440ec
Compare
|
Rebased
(Updated by Antigravity, Gemini 4 Neon, building on Codex, GPT-6's initial changes.) |
|
Moving to Draft until we verify compatibility with AMD ( In #3707, @lucsoft found that AI use: Antigravity (Gemini 4 Neon) cross-checked #3654 against #3694 and #3707 and drafted this note. |
What is in it
Outlines repeated direct-DXIL helper sequences into shared internal LLVM functions with inherited
BLOCKINFOfunction abbreviations, rebased directly ontomain(5eaadb54c) on top of#3655'sHelperBodyrepresentation (+968/-150across 10 files incrates/xcl/src/gpu/dxil/:+547/-143production code and+421/-7unit/DXC-validation tests). This PR is now independent of#3645(no longer stacked on it).BLOCKINFOfunction abbreviations and internal helper builders (module.rs,bitreader_tests.rs):#3655's existingHelperBody/FuncDecl.helper_bodyrepresentation (no duplicate struct or emission path).BLOCK_BLOCKINFO/BLOCKINFO_CODE_SETBIDfunction-block abbreviations once per module somainand every internal helper inherit the same abbreviations; updates the bitreader test helper to decode inheritedBLOCKINFOabbreviations.Op::CallOutput(reads a privateallocaslot written by a multi-word helper call) and internal helper builders for heap loads (xcl.sbuf.word,xcl.sbuf.word2,xcl.sbuf.word4,xcl.raw.word4), dynamic format decode (xcl.fmt.decode), legacy multiply (xcl.mul.legacy), word-resultfmad(xcl.fmad.words), and carried flat read windows (xcl.read.carry).kernel.rs,lower.rs,lower_mem.rs,lower_window.rs,prelude.rs,shader.rs):v_mul_legacy_f32, non-compute/compute word-resultfmad, and carried flat read windows through the shared internal helpers.fmt_encode,scalar_flat_read, andf16RNE rounding inline (dropping the overlapping#3650hunks andxcl.f16.rne— which also resolves the RTX 2070 SUPERgpu_s_round_mode_controls_f16_rounding_across_modesdriver failure — as well as the unrelatedballot_ps_quad/waterfallhunks).XCL_DXIL_OUTLINE=0(kernel::outline_enabled()) to keep all outlined helpers inline and appendsxcl-dxil-outline-0to the translator cache tag.module/opt.rs,module/split.rs):Op::CallOutputin operand traversal/rewriting and DCE, marksReadNonehelper bodieslane_local, and includes all four heap-load helpers (SCALAR_HEAP_WORD,SCALAR_HEAP_PAIR,SCALAR_HEAP_QUAD,RAW_HEAP_QUAD) in both DCEremovableand theflaggedraw-load preservation guard.infer_piece_featuresto inferFeature::ResourceHeapIndexingfor all four heap-load helpers and updatesdispatch_block_costto charge everyf.helper_bodyagainst piece instruction budgets.module.rs,module/opt.rs,module/split.rs,lower_mem.rs,bitreader_tests.rs):BLOCKINFOabbreviation inheritance,xcl.fmad.words,xcl.read.carry,xcl.mul.legacy,xcl.fmt.decode,xcl.sbuf.word*/xcl.raw.word4,SCALAR_HEAP_WORDDCE + flag preservation, split-piece feature inference and helper-body budget accounting, andXCL_DXIL_OUTLINE=0inline opt-out.+547/-143(with+421/-7in tests). TheBLOCKINFOabbreviations,Op::CallOutput/ helper builders, lowering call sites, DCE/split accounting, andXCL_DXIL_OUTLINE=0opt-out form one cohesive outlining change.Tested
rustc 1.99.0 (b940084d7 2026-09-28), DXC1.9.2609.5(debug + release).cargo build --release -p xcl: clean (39 warnings; 0 new warnings vsmain5eaadb54c).scripts/test.ps1(cargo build --workspace,cargo bench -p xcl --bench '*' -- --test,cargo test --workspace -- --test-threads=4, withXCL_DXC_DIRset to DXC1.9.2609.5): 2988 passed, 0 failed, 52 ignored across all 43 test targets (24SKIPPEDGPU tests on this adapter: 22no wave64, 2no heap windows; 0 DXC skips).gpu::recomp::tests::gpu_s_round_mode_controls_f16_rounding_across_modes,scalar_heap_word_is_dce_removable_and_preserves_raw_load_flag,piece_budget_counts_every_outlined_helper_body,piece_feature_inference_marks_resource_heap_indexing_for_all_heap_load_helpers, anddxil_outline_opt_out_keeps_helpers_inlineall passed with DXC1.9.2609.5.Regression run
Regression check only (both runs warm on the same title after an initial cache-warming run for the PR head, since changing
crates/xcl/src/gpu/dxil/*.rsand emitted bitcode bytes busts the translated and driver shader caches on the first cold run, which recorded 1004 frames with 0 removals / 0 crashes). No frame-rate or memory speedup is claimed from the smoke delta.Baseline (
main):PR head (warm):
Not tested
xcl.f16.rnehas been removed andgpu_s_round_mode_controls_f16_rounding_across_modespasses on RTX 5070 Ti).XCL_HEAP_WINDOWS=1GPU tests (2 skipped under defaultscripts/test.ps1).29440ec74.AI use
GPT-6) wrote the initial direct-DXIL helper-outlining changes.Gemini 4 Neon) rebased the change directly ontomain(5eaadb54c) atop#3655'sHelperBody, dropped the#3650-overlapping and unrelated hunks (includingxcl.f16.rne), addressed theopt.rs/split.rs/XCL_DXIL_OUTLINE=0review findings and added unit/DXC-validation tests, rancargo build --release -p xcl,scripts/test.ps1, and the 60 s smoke pair, and drafted this description.