Recompiler: speed up direct DXIL BitWriter, Module interning, and Shader::op #2056

Open
github-bot wants to merge 1 commit from github-bot/gh-2056 into main AGit
Owner

@⁠zondy1i on GitHub · 2026-11-25 02:15 UTC · original
zondy1i:dxil/builder-bitwriter-fastpath → main · +372 −67 · 4 files · 1 commits · open

Part of #1269.

Follows up #1927 by removing hot-path allocations, SipHash lookups, and byte-by-byte bit flushing across the direct DXIL builder and bitcode writer while keeping the emitted DXIL bit-for-bit identical.

What changed

  • crates/xcl/src/gpu/dxil/bitstream.rs:
    • Add BitWriter::with_capacity for pre-sized output buffers.
    • Flush BitWriter::emit in 32-bit little-endian words instead of byte-by-byte (draining residual bytes in align32).
    • Add a fast single-chunk path in BitWriter::vbr (value < hi).
    • Emit BitWriter::record_str directly without allocating an intermediate Vec<u64>.
  • crates/xcl/src/gpu/dxil/module.rs:
    • Use a multiplicative FastMap (like ssa.rs::VarHasher) for type_ids, const_ids, func_ids, and md_strings (none of these maps are iterated for output; bitcode writes from the ordered Vecs).
    • Lazily cache common primitive Ty handles (void, i1, i8, i32, i64, f16, f32, f64) on first intern so type-table order stays unchanged.
    • Rewrite Module::insts_use_type with Op::for_each_operand instead of allocating a Vec<Value> via inst_info on every instruction.
    • Add Module::call_with_first and Module::func_matches_op; pre-size BitWriter and reuse a single operands: Vec<u64> across write_types, ConstDef::Aggregate, MdDef::Node, named_md, and write_inst.
  • crates/xcl/src/gpu/dxil/shader.rs:
    • Cache declared dx.op function ids in Shader::op_cache keyed by (op, overload, ret), validating name prefix and parameter types without allocating before reusing the cached id (and falling back to declare_op on any mismatch so error reporting is preserved).
    • Check the DXC function attributes (debug builds) at the top of Shader::op, before the cache lookup, so a cache hit still verifies them; Shader::dispatch_piece starts with an empty op_cache.
  • crates/xcl/src/gpu/dxil/bitstream.rs & crates/xcl/src/gpu/dxil/bitreader_tests.rs:
    • Unit tests covering 32-bit word flushing / align32 across all residual bit counts 0..=31, record_str equivalence, insts_use_type operand scanning, op_cache mismatch fallback, and the attribute check on a cache hit (shader_op_cache_hit_still_checks_dx_op_attributes).

Benchmark
Seeded 500-program direct DXIL sweep (--direct --sample 500 --seed 1 --max-bytes 262144 --split 1, release build, Windows 11, Ryzen 5 7500F, median of 3 runs each):

Metric main (3da2abb) PR (a423147, same diff rebased to 9975777) Delta
1 thread — p50 7,188 us 5,702 us -20.7%
1 thread — p95 223,246 us 201,897 us -9.6%
1 thread — max 918,071 us 797,652 us -13.1%
8 threads — wall 4,565 ms 4,154 ms -9.0%
8 threads — p50 10,081 us 9,033 us -10.4%
8 threads — p95 361,416 us 320,453 us -11.3%

The benchmark and the byte-for-byte check were measured on the pre-rebase head 9975777; the changes since only initialise op_cache in dispatch_piece and move a debug-only assertion, so the emitted DXIL is unchanged.

Byte-for-byte check: 100/100 dumped .dxil containers (--sample 100 --seed 1 --max-bytes 262144 --split 1) have identical SHA-256 hashes against main.

Tested

  • Toolchain: Windows 11 x64, rustc 1.100.0, DXC / dxil.dll 1.9.2609.5, NVIDIA GeForce RTX 3060 Ti 8 GB (driver 621.01).
  • Rebased onto origin/main (b49be183). The merge was text-clean but no longer compiled (E0063 in Shader::dispatch_piece, which main added after this PR's base), so it now sets op_cache: FastMap::default() there; reported by @⁠thehollowedone and @⁠oni-swr. The same review pointed out that a warmed Shader::op cache hit skipped the debug check of the DXC function attributes, so the check now runs before the lookup.
  • cargo test --workspace -- --test-threads=4 on 8fc4de1: 1440 passed, 0 failed, 47 ignored across 37 test binaries (29 runtime SKIPPED notices from adapter-gated tests); includes dx_op_attrs_match_dxc, shader_op_cache_hit_still_checks_dx_op_attributes, dispatch_chain_* and translation_is_byte_identical_across_runs_and_threads.
  • 100/100 SHA-256 container identity check against main (pre-rebase head 9975777).

Not tested

  • gpu::dxil::fuzz_tests, AMD / Intel GPUs, Linux / Wine / vkd3d-proton.

Regression run
main:

xcl-smoke v1
commit: 80f4819098e921f2e1ab371144d4832f68ffedd6
gpu: NVIDIA GeForce RTX 3060 Ti
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1622 (PresentX 1622)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16539 MB

PR:

xcl-smoke v1
commit: 8fc4de1ab7ab9774de3c88fab9da4c2f97c9bee5
gpu: NVIDIA GeForce RTX 3060 Ti
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1623 (PresentX 1624)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14917 MB

AI use
Antigravity (Gemini 4 Neon) assisted with implementation, unit tests, and benchmarking; all changes were reviewed and verified locally.

**@⁠zondy1i** on GitHub · 2026-11-25 02:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/2056) `zondy1i:dxil/builder-bitwriter-fastpath` → `main` · +372 −67 · 4 files · 1 commits · open Part of #1269. Follows up #1927 by removing hot-path allocations, SipHash lookups, and byte-by-byte bit flushing across the direct DXIL builder and bitcode writer while keeping the emitted DXIL bit-for-bit identical. **What changed** - `crates/xcl/src/gpu/dxil/bitstream.rs`: - Add `BitWriter::with_capacity` for pre-sized output buffers. - Flush `BitWriter::emit` in 32-bit little-endian words instead of byte-by-byte (draining residual bytes in `align32`). - Add a fast single-chunk path in `BitWriter::vbr` (`value < hi`). - Emit `BitWriter::record_str` directly without allocating an intermediate `Vec<u64>`. - `crates/xcl/src/gpu/dxil/module.rs`: - Use a multiplicative `FastMap` (like `ssa.rs::VarHasher`) for `type_ids`, `const_ids`, `func_ids`, and `md_strings` (none of these maps are iterated for output; bitcode writes from the ordered `Vec`s). - Lazily cache common primitive `Ty` handles (`void`, `i1`, `i8`, `i32`, `i64`, `f16`, `f32`, `f64`) on first intern so type-table order stays unchanged. - Rewrite `Module::insts_use_type` with `Op::for_each_operand` instead of allocating a `Vec<Value>` via `inst_info` on every instruction. - Add `Module::call_with_first` and `Module::func_matches_op`; pre-size `BitWriter` and reuse a single `operands: Vec<u64>` across `write_types`, `ConstDef::Aggregate`, `MdDef::Node`, `named_md`, and `write_inst`. - `crates/xcl/src/gpu/dxil/shader.rs`: - Cache declared `dx.op` function ids in `Shader::op_cache` keyed by `(op, overload, ret)`, validating name prefix and parameter types without allocating before reusing the cached id (and falling back to `declare_op` on any mismatch so error reporting is preserved). - Check the DXC function attributes (debug builds) at the top of `Shader::op`, before the cache lookup, so a cache hit still verifies them; `Shader::dispatch_piece` starts with an empty `op_cache`. - `crates/xcl/src/gpu/dxil/bitstream.rs` & `crates/xcl/src/gpu/dxil/bitreader_tests.rs`: - Unit tests covering 32-bit word flushing / `align32` across all residual bit counts `0..=31`, `record_str` equivalence, `insts_use_type` operand scanning, `op_cache` mismatch fallback, and the attribute check on a cache hit (`shader_op_cache_hit_still_checks_dx_op_attributes`). **Benchmark** Seeded 500-program direct DXIL sweep (`--direct --sample 500 --seed 1 --max-bytes 262144 --split 1`, release build, Windows 11, Ryzen 5 7500F, median of 3 runs each): | Metric | `main` (`3da2abb`) | PR (`a423147`, same diff rebased to `9975777`) | Delta | | :--- | ---: | ---: | ---: | | 1 thread — p50 | 7,188 us | 5,702 us | **-20.7%** | | 1 thread — p95 | 223,246 us | 201,897 us | **-9.6%** | | 1 thread — max | 918,071 us | 797,652 us | **-13.1%** | | 8 threads — wall | 4,565 ms | 4,154 ms | **-9.0%** | | 8 threads — p50 | 10,081 us | 9,033 us | **-10.4%** | | 8 threads — p95 | 361,416 us | 320,453 us | **-11.3%** | The benchmark and the byte-for-byte check were measured on the pre-rebase head `9975777`; the changes since only initialise `op_cache` in `dispatch_piece` and move a debug-only assertion, so the emitted DXIL is unchanged. Byte-for-byte check: 100/100 dumped `.dxil` containers (`--sample 100 --seed 1 --max-bytes 262144 --split 1`) have identical SHA-256 hashes against `main`. **Tested** - Toolchain: Windows 11 x64, `rustc 1.100.0`, DXC / `dxil.dll` `1.9.2609.5`, NVIDIA GeForce RTX 3060 Ti 8 GB (driver `621.01`). - Rebased onto `origin/main` (`b49be183`). The merge was text-clean but no longer compiled (E0063 in `Shader::dispatch_piece`, which `main` added after this PR's base), so it now sets `op_cache: FastMap::default()` there; reported by @⁠thehollowedone and @⁠oni-swr. The same review pointed out that a warmed `Shader::op` cache hit skipped the debug check of the DXC function attributes, so the check now runs before the lookup. - `cargo test --workspace -- --test-threads=4` on `8fc4de1`: 1440 passed, 0 failed, 47 ignored across 37 test binaries (29 runtime `SKIPPED` notices from adapter-gated tests); includes `dx_op_attrs_match_dxc`, `shader_op_cache_hit_still_checks_dx_op_attributes`, `dispatch_chain_*` and `translation_is_byte_identical_across_runs_and_threads`. - 100/100 SHA-256 container identity check against `main` (pre-rebase head `9975777`). **Not tested** - `gpu::dxil::fuzz_tests`, AMD / Intel GPUs, Linux / Wine / vkd3d-proton. **Regression run** `main`: ``` xcl-smoke v1 commit: 80f4819098e921f2e1ab371144d4832f68ffedd6 gpu: NVIDIA GeForce RTX 3060 Ti title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1622 (PresentX 1622) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16539 MB ``` PR: ``` xcl-smoke v1 commit: 8fc4de1ab7ab9774de3c88fab9da4c2f97c9bee5 gpu: NVIDIA GeForce RTX 3060 Ti title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1623 (PresentX 1624) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14917 MB ``` **AI use** Antigravity (Gemini 4 Neon) assisted with implementation, unit tests, and benchmarking; all changes were reviewed and verified locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:16:57 +00:00
Author
Owner

@⁠WebIdentity1 on GitHub · 2026-11-25 02:24 UTC · original · edited 2026-11-25 02:29 UTC

Independent synthetic comparison of parent 3da2abb81606df622610e009f0430de99aa9881c and head a423147005f9d691260086edc899dee79dcfb4c3: identical DXIL and correct GPU output, with a 5.6% lower median translation time for the larger fixture. This is a public-input check, separate from the pack benchmark in the description.

Tested — native Windows10 Home19045, Ryzen7800X3D, RTX3090 driver591.74, Rust/Cargo1.98.1MSVC, DXC/DXIL1.8.2502.11, release. Runtime sources unchanged; identical local test-only fixture on both revisions. XCL_ADAPTER=3090, XCL_SPLIT_WAVE64=1, XCL_DIRECT_COMPACT=0; no XCL_DXIL_NO_OPT override.

The fixture uses translate_compute with the production compute ABI, a 64-lane split-wave64 group, live raw-buffer inputs and an integer add/xor chain with varying literals. It validates the resulting DXIL and checks all64 output words against a CPU calculation, plus all64 input words remain unchanged.

Chain size Parent translation median PR translation median DXIL size, identical both
256 add/xor pairs 2.120 ms 1.992 ms 9,260 B
4,096 pairs 27.661 ms 26.125 ms 123,392 B

Small row: one process per revision, five timed translations after one warm-up. Large row: base/head/head/base fresh-process order, five timed translations after a warm-up per process (ten timings per revision). Individual process medians are27.819 /27.634ms for parent and26.082 /26.213ms for PR. The timer wraps the existing translate_compute API, including its worker creation; final explicit validation and GPU work are outside the timer. This workload mainly exercises module construction/interning and serialization; it is not a substitute for broad opcode-cache or pack coverage.

Peak process commit before GPU initialization was15.42–15.66MiB on parent and15.24–15.30MiB on PR for the larger fixture. The small fixture was4.80 versus4.92MiB. These are whole-process high-water marks, including the harness, warm-up and retained reference DXIL; they do not establish a substantial memory saving.

Both sizes have matching SHA-256 containers across revisions, and every timed translation equals its process's reference bytes. Six native test processes each passed 1 /0 /0 /0 skipped, six real GPU dispatches total. Both317-file manifests matched before/after build, after all runs, and locally. Both copied release-test executable hashes also remained unchanged. Release builds passed; the selected command was:

cargo test --release --locked -p xcl --lib --no-run --message-format=json
<captured test executable> synthetic_dxil_builder_cost_and_output --test-threads=1 --show-output

Not tested — full workspace, retail smoke/gameplay, AMD/Intel, production-pack performance, concurrent translation memory, cold driver PSO time or GPU throughput. The GPU checks establish output correctness here, not a rendering speedup. No runtime edit, commit/push or competing PR.

AI use — Codex (GPT-6) wrote the synthetic fixture, ran/reviewed the native comparisons, verified hashes and prepared this report.

Reproducible test-only fixture (append to recomp/tests.rs; XCL_PROBE_PAIRS selects size)
#[test]
fn synthetic_dxil_builder_cost_and_output() {
    use std::time::Instant;
    use windows_sys::Win32::System::ProcessStatus::{K32GetProcessMemoryInfo, PROCESS_MEMORY_COUNTERS_EX};
    let pairs: u32 = std::env::var("XCL_PROBE_PAIRS").unwrap_or_else(|_| "256".into()).parse().unwrap();
    let mut code = Vec::new();
    let mut emit = |n: &str, e: &str, f: &[(&str, u64)], lit| code.extend(encode(n, e, f, lit).unwrap());
    emit("V_LSHLREV_B32", "ENC_VOP2", &[("VDST", 2), ("SRC0", 130), ("VSRC1", 0)], None);
    emit("GLOBAL_LOAD_DWORD", "ENC_FLAT_GLBL", &[("VDST", 1), ("ADDR", 2), ("SADDR", 0)], None);
    for j in 0..pairs {
        emit("V_ADD_NC_U32", "ENC_VOP2", &[("VDST", 1), ("SRC0", 255), ("VSRC1", 1)], Some(0x9E37_79B9u32.wrapping_add(j)));
        emit("V_XOR_B32", "ENC_VOP2", &[("VDST", 1), ("SRC0", 255), ("VSRC1", 1)], Some(0x85EB_CA6Bu32.rotate_left(j % 32)));
    }
    emit("GLOBAL_STORE_DWORD", "ENC_FLAT_GLBL", &[("ADDR", 2), ("DATA", 1), ("SADDR", 0), ("OFFSET", 0x400)], None);
    emit("S_ENDPGM", "ENC_SOPP", &[], None);
    let cs = super::CsInterface { threads: [64, 1, 1], user_sgprs: 2, tgid: [false; 3], tg_size: false, tid_components: 1 };
    let opt = crate::gpu::dxil::kernel::KernelOptions { wave64: true, split: true, mem_windows: 1, sampler_base: 0 };
    // Warm the translator/validator before timing. GPU initialization happens after all measurements.
    let first = crate::gpu::dxil::kernel::translate_compute(&code, opt, &cs).expect("translation");
    let mut samples = Vec::new();
    for _ in 0..5 {
        let start = Instant::now();
        let got = crate::gpu::dxil::kernel::translate_compute(&code, opt, &cs).expect("translation");
        samples.push(start.elapsed().as_micros());
        assert_eq!(got.dxil, first.dxil, "translation bytes must be deterministic");
    }
    let (private, peak) = unsafe {
        let mut c: PROCESS_MEMORY_COUNTERS_EX = std::mem::zeroed();
        c.cb = std::mem::size_of::<PROCESS_MEMORY_COUNTERS_EX>() as u32;
        assert_ne!(K32GetProcessMemoryInfo(windows_sys::Win32::System::Threading::GetCurrentProcess(), &mut c as *mut _ as *mut _, c.cb), 0);
        (c.PrivateUsage, c.PeakPagefileUsage)
    };
    println!("BUILDER pairs={pairs} code_bytes={} dxil_bytes={} times_us={samples:?} private={private} peak_commit={peak}", code.len(), first.dxil.len());
    if let Ok(path) = std::env::var("XCL_PROBE_DXIL") { std::fs::write(path, &first.dxil).unwrap(); }
    crate::gpu::dxil::validate::validate(&first.dxil).expect("valid DXIL");
    let mut io = vec![0u32; super::KERNEL_SGPRS];
    io[0] = 0x100;
    let mut mem = vec![0u32; 0x700 / 4];
    let mut want = Vec::new();
    for lane in 0..64usize {
        let mut x = (lane as u32).wrapping_mul(0x1234_5679) ^ 0xCAFE_BABE;
        mem[0x100 / 4 + lane] = x;
        for j in 0..pairs { x = x.wrapping_add(0x9E37_79B9u32.wrapping_add(j)) ^ 0x85EB_CA6Bu32.rotate_left(j % 32); }
        want.push(x);
    }
    let out = runner::dispatch(&first.dxil, [1, 1, 1], &io, &mem).expect("GPU dispatch");
    println!("BUILDER adapter={} checked_words={}", runner::adapter().unwrap(), want.len());
    assert_eq!(&out[0x500 / 4..0x500 / 4 + 64], want.as_slice());
    assert_eq!(&out[0x100 / 4..0x100 / 4 + 64], &mem[0x100 / 4..0x100 / 4 + 64], "inputs unchanged");
}
**@⁠WebIdentity1** on GitHub · 2026-11-25 02:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/2056#issuecomment-7150673112) · edited 2026-11-25 02:29 UTC Independent synthetic comparison of parent `3da2abb81606df622610e009f0430de99aa9881c` and head `a423147005f9d691260086edc899dee79dcfb4c3`: **identical DXIL and correct GPU output, with a 5.6% lower median translation time for the larger fixture.** This is a public-input check, separate from the pack benchmark in the description. **Tested** — native Windows10 Home19045, Ryzen7800X3D, RTX3090 driver591.74, Rust/Cargo1.98.1MSVC, DXC/DXIL1.8.2502.11, **release**. Runtime sources unchanged; identical local test-only fixture on both revisions. `XCL_ADAPTER=3090`, `XCL_SPLIT_WAVE64=1`, `XCL_DIRECT_COMPACT=0`; no `XCL_DXIL_NO_OPT` override. The fixture uses `translate_compute` with the production compute ABI, a 64-lane split-wave64 group, live raw-buffer inputs and an integer add/xor chain with varying literals. It validates the resulting DXIL and checks all64 output words against a CPU calculation, plus all64 input words remain unchanged. | Chain size | Parent translation median | PR translation median | DXIL size, identical both | |---|---:|---:|---:| | 256 add/xor pairs | 2.120 ms | 1.992 ms | 9,260 B | | 4,096 pairs | 27.661 ms | 26.125 ms | 123,392 B | Small row: one process per revision, five timed translations after one warm-up. Large row: **base/head/head/base** fresh-process order, five timed translations after a warm-up per process (ten timings per revision). Individual process medians are27.819 /27.634ms for parent and26.082 /26.213ms for PR. The timer wraps the existing `translate_compute` API, including its worker creation; final explicit validation and GPU work are outside the timer. This workload mainly exercises module construction/interning and serialization; it is not a substitute for broad opcode-cache or pack coverage. Peak process commit **before GPU initialization** was15.42–15.66MiB on parent and15.24–15.30MiB on PR for the larger fixture. The small fixture was4.80 versus4.92MiB. These are whole-process high-water marks, including the harness, warm-up and retained reference DXIL; they do **not** establish a substantial memory saving. Both sizes have matching SHA-256 containers across revisions, and every timed translation equals its process's reference bytes. Six native test processes each passed **1 /0 /0 /0 skipped**, six real GPU dispatches total. Both317-file manifests matched before/after build, after all runs, and locally. Both copied release-test executable hashes also remained unchanged. Release builds passed; the selected command was: ```text cargo test --release --locked -p xcl --lib --no-run --message-format=json <captured test executable> synthetic_dxil_builder_cost_and_output --test-threads=1 --show-output ``` **Not tested** — full workspace, retail smoke/gameplay, AMD/Intel, production-pack performance, concurrent translation memory, cold driver PSO time or GPU throughput. The GPU checks establish output correctness here, not a rendering speedup. No runtime edit, commit/push or competing PR. **AI use** — Codex (GPT-6) wrote the synthetic fixture, ran/reviewed the native comparisons, verified hashes and prepared this report. <details><summary>Reproducible test-only fixture (append to recomp/tests.rs; XCL_PROBE_PAIRS selects size)</summary> ```rust #[test] fn synthetic_dxil_builder_cost_and_output() { use std::time::Instant; use windows_sys::Win32::System::ProcessStatus::{K32GetProcessMemoryInfo, PROCESS_MEMORY_COUNTERS_EX}; let pairs: u32 = std::env::var("XCL_PROBE_PAIRS").unwrap_or_else(|_| "256".into()).parse().unwrap(); let mut code = Vec::new(); let mut emit = |n: &str, e: &str, f: &[(&str, u64)], lit| code.extend(encode(n, e, f, lit).unwrap()); emit("V_LSHLREV_B32", "ENC_VOP2", &[("VDST", 2), ("SRC0", 130), ("VSRC1", 0)], None); emit("GLOBAL_LOAD_DWORD", "ENC_FLAT_GLBL", &[("VDST", 1), ("ADDR", 2), ("SADDR", 0)], None); for j in 0..pairs { emit("V_ADD_NC_U32", "ENC_VOP2", &[("VDST", 1), ("SRC0", 255), ("VSRC1", 1)], Some(0x9E37_79B9u32.wrapping_add(j))); emit("V_XOR_B32", "ENC_VOP2", &[("VDST", 1), ("SRC0", 255), ("VSRC1", 1)], Some(0x85EB_CA6Bu32.rotate_left(j % 32))); } emit("GLOBAL_STORE_DWORD", "ENC_FLAT_GLBL", &[("ADDR", 2), ("DATA", 1), ("SADDR", 0), ("OFFSET", 0x400)], None); emit("S_ENDPGM", "ENC_SOPP", &[], None); let cs = super::CsInterface { threads: [64, 1, 1], user_sgprs: 2, tgid: [false; 3], tg_size: false, tid_components: 1 }; let opt = crate::gpu::dxil::kernel::KernelOptions { wave64: true, split: true, mem_windows: 1, sampler_base: 0 }; // Warm the translator/validator before timing. GPU initialization happens after all measurements. let first = crate::gpu::dxil::kernel::translate_compute(&code, opt, &cs).expect("translation"); let mut samples = Vec::new(); for _ in 0..5 { let start = Instant::now(); let got = crate::gpu::dxil::kernel::translate_compute(&code, opt, &cs).expect("translation"); samples.push(start.elapsed().as_micros()); assert_eq!(got.dxil, first.dxil, "translation bytes must be deterministic"); } let (private, peak) = unsafe { let mut c: PROCESS_MEMORY_COUNTERS_EX = std::mem::zeroed(); c.cb = std::mem::size_of::<PROCESS_MEMORY_COUNTERS_EX>() as u32; assert_ne!(K32GetProcessMemoryInfo(windows_sys::Win32::System::Threading::GetCurrentProcess(), &mut c as *mut _ as *mut _, c.cb), 0); (c.PrivateUsage, c.PeakPagefileUsage) }; println!("BUILDER pairs={pairs} code_bytes={} dxil_bytes={} times_us={samples:?} private={private} peak_commit={peak}", code.len(), first.dxil.len()); if let Ok(path) = std::env::var("XCL_PROBE_DXIL") { std::fs::write(path, &first.dxil).unwrap(); } crate::gpu::dxil::validate::validate(&first.dxil).expect("valid DXIL"); let mut io = vec![0u32; super::KERNEL_SGPRS]; io[0] = 0x100; let mut mem = vec![0u32; 0x700 / 4]; let mut want = Vec::new(); for lane in 0..64usize { let mut x = (lane as u32).wrapping_mul(0x1234_5679) ^ 0xCAFE_BABE; mem[0x100 / 4 + lane] = x; for j in 0..pairs { x = x.wrapping_add(0x9E37_79B9u32.wrapping_add(j)) ^ 0x85EB_CA6Bu32.rotate_left(j % 32); } want.push(x); } let out = runner::dispatch(&first.dxil, [1, 1, 1], &io, &mem).expect("GPU dispatch"); println!("BUILDER adapter={} checked_words={}", runner::adapter().unwrap(), want.len()); assert_eq!(&out[0x500 / 4..0x500 / 4 + 64], want.as_slice()); assert_eq!(&out[0x100 / 4..0x100 / 4 + 64], &mem[0x100 / 4..0x100 / 4 + 64], "inputs unchanged"); } ``` </details>
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 02:32 UTC · original

PR #2056 — independent CPU test report

Tested

  • Commit a423147005f9d691260086edc899dee79dcfb4c3 from a clean detached checkout. GitHub still showed this as the open PR head after the run.
  • Windows 11 Enterprise Evaluation x64 (26200.9974), AMD Ryzen 7 3800X, Rust 1.100.0 (x86_64-pc-windows-msvc), unoptimized test profile with debug info disabled. Installed Intel Arc A770 driver 32.0.101.9175 and DXC/DXIL 1.9.2609.5 were outside the scope of these CPU checks.
  • CARGO_TARGET_DIR=L:/XclTooling/pr1947-1831ec4-t3-97236edf/target, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0. TEMP and TMP pointed to the temp directory under this run's log directory.

cargo test --locked -p xcl --lib --jobs 2 -- --exact --test-threads=1 --nocapture gpu::dxil::bitstream::tests::emit_word_flush_and_align32_match_byte_by_byte gpu::dxil::bitstream::tests::record_str_matches_record_bytes gpu::dxil::bitreader_tests::insts_use_type_finds_result_and_operand_types gpu::dxil::bitreader_tests::shader_op_cache_rejects_mismatched_redeclaration

4 passed, 0 failed, 0 ignored, 0 skipped, 1088 filtered out. Cargo exited 0. Word flushing and 32-bit alignment matched the reference across all 32 residual lengths, string record encoding matched ordinary record encoding, integer operand scanning found the i64 operands of an i1 comparison, and the declaration-cache lookup preserved the builder error for mismatched parameter types.

Not tested
GPU execution, DXIL validation or whole-shader byte parity, retail packs or smoke runs, performance, malformed shaders or arbitrary inputs, and the rest of the workspace test suite.

AI use
T3 Code / Codex (gpt-6.2-sol) selected and ran the four checked-in tests and wrote this report from the recorded output.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 02:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2056#issuecomment-7150857250) PR #2056 — independent CPU test report Tested - Commit a423147005f9d691260086edc899dee79dcfb4c3 from a clean detached checkout. GitHub still showed this as the open PR head after the run. - Windows 11 Enterprise Evaluation x64 (26200.9974), AMD Ryzen 7 3800X, Rust 1.100.0 (x86_64-pc-windows-msvc), unoptimized test profile with debug info disabled. Installed Intel Arc A770 driver 32.0.101.9175 and DXC/DXIL 1.9.2609.5 were outside the scope of these CPU checks. - CARGO_TARGET_DIR=L:/XclTooling/pr1947-1831ec4-t3-97236edf/target, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0. TEMP and TMP pointed to the temp directory under this run's log directory. cargo test --locked -p xcl --lib --jobs 2 -- --exact --test-threads=1 --nocapture gpu::dxil::bitstream::tests::emit_word_flush_and_align32_match_byte_by_byte gpu::dxil::bitstream::tests::record_str_matches_record_bytes gpu::dxil::bitreader_tests::insts_use_type_finds_result_and_operand_types gpu::dxil::bitreader_tests::shader_op_cache_rejects_mismatched_redeclaration 4 passed, 0 failed, 0 ignored, 0 skipped, 1088 filtered out. Cargo exited 0. Word flushing and 32-bit alignment matched the reference across all 32 residual lengths, string record encoding matched ordinary record encoding, integer operand scanning found the i64 operands of an i1 comparison, and the declaration-cache lookup preserved the builder error for mismatched parameter types. Not tested GPU execution, DXIL validation or whole-shader byte parity, retail packs or smoke runs, performance, malformed shaders or arbitrary inputs, and the rest of the workspace test suite. AI use T3 Code / Codex (gpt-6.2-sol) selected and ran the four checked-in tests and wrote this report from the recorded output.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 04:41 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 04:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/2056#issuecomment-7153082151) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠anes66 on GitHub · 2026-11-25 06:17 UTC · original

CPU-only serialization checks on exact head 99757777918cef2f8f3da5f90564a442c974cabd passed. Optional test companion 8ce813f is directly on that head, with tests only. It adds two bitstream tests and carries forward our mixed-record fixtures from #1927.

Tested

  • Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug. No GPU, DXC, validator or title execution.
  • 4,224 fixed/VBR cases: all residual counts 0–31, fixed widths 0–32 and four value patterns. VBR widths 2–32 include zero, continuation-boundary values, u32::MAX and u64::MAX, with interleaved alignment. Expected bits are generated individually; VBR chunk count comes from significant-bit length, independently of the writer's loop / fast path.
  • 64 string-record cases compare direct emission with the operand-record route: empty, ASCII, embedded NUL and multibyte UTF-8 strings; lengths around 31/32/127 repeats; nesting depths 1–4; prefix operands include u64::MAX.
  • Mixed long/short calls, GEPs, binops, switches and phis retain their operand counts. An 8,194-binop mixed module is stable across repeated writes.
  • Control using parent cbc296ab65a2661a61e3e2da109134bcd5319f60's three changed production files (bitstream.rs, module.rs, shader.rs), with the same bitreader fixture overlay: 8 passed / 0 failed / 0 ignored / 0 skips. The PR implementation also passes those eight tests. Both produce 79,936 byte-identical raw-bitcode bytes, SHA-256 f2f7fed408e1e265ca3b7e39f5139dae858c743062d1804efb90926a3f5f3576.
  • Final cargo test --locked -p xcl --lib gpu::dxil::bitstream::tests:: -j 2 -- --nocapture --test-threads=1: 7 passed / 0 failed / 0 ignored / 0 skips.
  • Final cargo test --locked -p xcl --lib gpu::dxil::bitreader_tests:: -j 2 -- --nocapture --test-threads=1: 8 passed / 0 failed / 0 ignored / 0 skips.
  • Temporary negative control changing the VBR fast-path boundary from < hi to <= hi fails the independent bit reference. Restored before the final passing runs and commit; final raw-bitcode hash still matches the parent control.

Not tested
Serialized DXIL validation, GPU execution, fuzz suite, retail input, release or newer-main integration. Printed debug timings are not controlled performance evidence. This checks these output contracts and one synthetic module's identity, not every module or a measured startup speedup.

AI use: Codex (GPT-6; exact variant unavailable) wrote/reused the test fixtures and temporary control, ran CPU verification and prepared this report.

**@⁠anes66** on GitHub · 2026-11-25 06:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/2056#issuecomment-7154643812) CPU-only serialization checks on exact head `99757777918cef2f8f3da5f90564a442c974cabd` passed. Optional test companion [8ce813f](https://github.com/anes66/xcl/commit/8ce813f89151ca73b6cb3701ba86300bd452cce7) is directly on that head, with tests only. It adds two bitstream tests and carries forward our mixed-record fixtures from #1927. **Tested** - Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug. No GPU, DXC, validator or title execution. - **4,224 fixed/VBR cases**: all residual counts 0–31, fixed widths 0–32 and four value patterns. VBR widths 2–32 include zero, continuation-boundary values, u32::MAX and u64::MAX, with interleaved alignment. Expected bits are generated individually; VBR chunk count comes from significant-bit length, independently of the writer's loop / fast path. - **64 string-record cases** compare direct emission with the operand-record route: empty, ASCII, embedded NUL and multibyte UTF-8 strings; lengths around 31/32/127 repeats; nesting depths 1–4; prefix operands include u64::MAX. - Mixed long/short calls, GEPs, binops, switches and phis retain their operand counts. An 8,194-binop mixed module is stable across repeated writes. - Control using parent `cbc296ab65a2661a61e3e2da109134bcd5319f60`'s three changed production files (`bitstream.rs`, `module.rs`, `shader.rs`), with the same bitreader fixture overlay: **8 passed / 0 failed / 0 ignored / 0 skips**. The PR implementation also passes those eight tests. Both produce **79,936 byte-identical raw-bitcode bytes**, SHA-256 `f2f7fed408e1e265ca3b7e39f5139dae858c743062d1804efb90926a3f5f3576`. - Final `cargo test --locked -p xcl --lib gpu::dxil::bitstream::tests:: -j 2 -- --nocapture --test-threads=1`: **7 passed / 0 failed / 0 ignored / 0 skips**. - Final `cargo test --locked -p xcl --lib gpu::dxil::bitreader_tests:: -j 2 -- --nocapture --test-threads=1`: **8 passed / 0 failed / 0 ignored / 0 skips**. - Temporary negative control changing the VBR fast-path boundary from `< hi` to `<= hi` fails the independent bit reference. Restored before the final passing runs and commit; final raw-bitcode hash still matches the parent control. **Not tested** Serialized DXIL validation, GPU execution, fuzz suite, retail input, release or newer-main integration. Printed debug timings are not controlled performance evidence. This checks these output contracts and one synthetic module's identity, not every module or a measured startup speedup. AI use: Codex (GPT-6; exact variant unavailable) wrote/reused the test fixtures and temporary control, ran CPU verification and prepared this report.
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-25 13:56 UTC · original

Independent release check of 9975777 against its exact parent cbc296a. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11.

I reran the public synthetic add/XOR fixture with 4,096 pairs and one 64-lane group using split wave64. I built both test binaries with cargo test --offline --locked --release -p xcl --lib -j 4 --no-run --message-format=json. The test-only fixture was identical on both revisions. Fresh process order was parent, PR, PR, parent, with two warm-ups and seven timed translations per process.

  • DXIL and GPU output: all four runs emitted the same 123,400-byte container, verified by SHA-256. The DXIL validator accepted it, all 64 output words matched the CPU reference, and all 64 input words stayed unchanged in each run. Four runs passed with zero skips. The four stock serialization and module tests also passed on the PR.
  • CPU translation time: median of 14 timings per revision was 21.451 ms → 20.322 ms (5.3% lower). The two parent process medians were 21.416 and 21.520 ms. The two PR medians were 20.341 and 20.302 ms. The timer covers translation only. Driver PSO compilation and GPU execution were outside it.

Synthetic input only. No retail or gameplay performance claim.

AI-assisted. Codex (GPT-6, exact variant unavailable) adapted the fixture, ran the tests and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-25 13:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/2056#issuecomment-7164515964) Independent release check of [9975777](https://github.com/xcl-dev/xcl/commit/99757777918cef2f8f3da5f90564a442c974cabd) against its exact [parent cbc296a](https://github.com/xcl-dev/xcl/commit/cbc296ab65a2661a61e3e2da109134bcd5319f60). Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11. I reran the [public synthetic add/XOR fixture](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2056) with 4,096 pairs and one 64-lane group using split wave64. I built both test binaries with `cargo test --offline --locked --release -p xcl --lib -j 4 --no-run --message-format=json`. The test-only fixture was identical on both revisions. Fresh process order was parent, PR, PR, parent, with two warm-ups and seven timed translations per process. - **DXIL and GPU output:** all four runs emitted the same 123,400-byte container, verified by SHA-256. The DXIL validator accepted it, all 64 output words matched the CPU reference, and all 64 input words stayed unchanged in each run. Four runs passed with zero skips. The four stock serialization and module tests also passed on the PR. - **CPU translation time:** median of 14 timings per revision was **21.451 ms → 20.322 ms (5.3% lower)**. The two parent process medians were 21.416 and 21.520 ms. The two PR medians were 20.341 and 20.302 ms. The timer covers translation only. Driver PSO compilation and GPU execution were outside it. Synthetic input only. No retail or gameplay performance claim. AI-assisted. Codex (GPT-6, exact variant unavailable) adapted the fixture, ran the tests and drafted this report.
Author
Owner

@⁠oni-swr on GitHub · 2026-11-25 21:10 UTC · original

Tested

  • Windows 11 Pro build 26200; AMD Radeon RX 7800 XT 16 GB (driver 32.0.31035.1003); AMD Ryzen 7 5700X3D CPU; Rust 1.100.0 MSVC; DXC/DXIL 1.8.2502.11 from Windows SDK 10.0.26100.0. Debug profile. XCL_ADAPTER=radeon.
  • Tested exact PR head 99757777918cef2f8f3da5f90564a442c974cabd. Baseline origin/main was 6d12f58a229bc73889878a448c64dc3af25eeba0.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1,157 passed, 1 failed, 46 ignored, 16 SKIPPED notices (exit 101). The sole failure was gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, also the sole baseline failure.
  • cargo test -p xcl --lib gpu::dxil::bitstream::tests -- --test-threads=1: 5 passed, 0 failed, 0 ignored.
  • cargo test -p xcl --lib gpu::dxil::bitreader_tests -- --test-threads=1: 6 passed, 0 failed, 0 ignored.
  • Current-main baseline command cargo test --workspace --no-fail-fast -- --test-threads=4: 1,422 passed, 1 failed, 46 ignored, 25 SKIPPED notices (exit 101); its sole failure was the same fuzz test.

Not tested

  • The merged tree on current origin/main (6d12f58a229bc73889878a448c64dc3af25eeba0) did not compile: a Shader initializer is missing the new op_cache field. The GPU suite above ran on the exact PR head.
  • Retail titles or game data; no dumps were used.

AI use

  • Codex (gpt-6-luna) ran the tests and prepared this report.
**@⁠oni-swr** on GitHub · 2026-11-25 21:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2056#issuecomment-7174717675) **Tested** - Windows 11 Pro build 26200; AMD Radeon RX 7800 XT 16 GB (driver 32.0.31035.1003); AMD Ryzen 7 5700X3D CPU; Rust 1.100.0 MSVC; DXC/DXIL 1.8.2502.11 from Windows SDK 10.0.26100.0. Debug profile. `XCL_ADAPTER=radeon`. - Tested exact PR head `99757777918cef2f8f3da5f90564a442c974cabd`. Baseline `origin/main` was `6d12f58a229bc73889878a448c64dc3af25eeba0`. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1,157 passed, 1 failed, 46 ignored, 16 `SKIPPED` notices (exit 101). The sole failure was `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, also the sole baseline failure. - `cargo test -p xcl --lib gpu::dxil::bitstream::tests -- --test-threads=1`: 5 passed, 0 failed, 0 ignored. - `cargo test -p xcl --lib gpu::dxil::bitreader_tests -- --test-threads=1`: 6 passed, 0 failed, 0 ignored. - Current-main baseline command `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1,422 passed, 1 failed, 46 ignored, 25 `SKIPPED` notices (exit 101); its sole failure was the same fuzz test. **Not tested** - The merged tree on current `origin/main` (`6d12f58a229bc73889878a448c64dc3af25eeba0`) did not compile: a `Shader` initializer is missing the new `op_cache` field. The GPU suite above ran on the exact PR head. - Retail titles or game data; no dumps were used. **AI use** - Codex (gpt-6-luna) ran the tests and prepared this report.
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-25 23:00 UTC · original

Follow-up to the current-main compile failure already reported. I reproduced it with #2056 head 9975777 merged without a commit into main e1d84b7: cargo check --offline --locked -p xcl failed with E0063 at shader.rs:166. Main added Shader::dispatch_piece() after this PR's base; its Self initializer needs op_cache: FastMap::default(). An empty per-piece cache is appropriate because Module::declarations() carries the declarations and IDs, and the first lookup resolves them.

I found one smaller diagnostic regression while checking that merge. On a warmed Shader::op cache hit, the existing debug assertion for DXC function attributes in declare_op is bypassed. A local debug regression that calls opcode 35 with ReadNone and then None failed before the assertion was moved (should panic did not panic), and passed after it was moved before the cache lookup. This affects the builder's debug check; I did not find a retail output failure.

Suggested diff for the rebase (tested locally, not committed or pushed):

@@ Shader::dispatch_piece
             rov: self.rov,
+            op_cache: FastMap::default(),
@@ Shader::op
     pub fn op(&mut self, op: u32, name: &str, overload: Option<Ty>, ret: Ty, args: &[Value], attrs: FnAttrs) -> Value {
+        #[cfg(debug_assertions)]
+        if let Some(want) = dxc_fn_attrs(op) {
+            debug_assert_eq!(attrs, want, "dx.op {op} ({name}) attributes differ from DXC's");
+        }
         let i32 = self.m.i32();
@@ Shader::declare_op
-        if let Some(want) = dxc_fn_attrs(op) {
-            debug_assert_eq!(attrs, want, "dx.op {op} ({name}) attributes differ from DXC's");
-        }
@@ before pops_rov_tests
+#[cfg(all(test, debug_assertions))]
+mod op_cache_tests {
+    use super::*;
+    #[test]
+    #[should_panic(expected = "attributes differ from DXC's")]
+    fn cache_hit_still_checks_dx_op_attributes() {
+        let mut shader = Shader::new(Stage::Compute, (6, 6));
+        let i32 = shader.m.i32();
+        let a = shader.m.i32c(1);
+        let call = Shader::op;
+        call(&mut shader, 35, "binary", Some(i32), i32, &[a, a], FnAttrs::ReadNone);
+        call(&mut shader, 35, "binary", Some(i32), i32, &[a, a], FnAttrs::None);
+    }
+}

On the isolated merge with this diff: cargo check --offline --locked -p xcl passed; dispatch_chain_payload_skips_middle_piece and the new cache-hit regression each passed 1/0; cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 passed 1,428/0/46 across 37 binaries with 25 explicit GPU skips (21 no native wave64, 3 unsupported f16 forms, 1 no heap windows). This is integration evidence for an uncommitted tree, not a test report for a clean rebased PR head. No title smoke or AMD run was done. AI use: Codex (GPT-6; exact variant unavailable) built and tested the local patch and drafted this comment; GPT-6.2 Astra Low reviewed the merge path.

**@⁠thehollowedone** on GitHub · 2026-11-25 23:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/2056#issuecomment-7177029350) Follow-up to the [current-main compile failure already reported](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2056). I reproduced it with [#2056 head `9975777`](https://github.com/xcl-dev/xcl/commit/99757777918cef2f8f3da5f90564a442c974cabd) merged without a commit into [`main` `e1d84b7`](https://github.com/xcl-dev/xcl/commit/e1d84b7d9153f86a97d2ec5d209d196046fc0bea): `cargo check --offline --locked -p xcl` failed with E0063 at `shader.rs:166`. Main added `Shader::dispatch_piece()` after this PR's base; its `Self` initializer needs `op_cache: FastMap::default()`. An empty per-piece cache is appropriate because `Module::declarations()` carries the declarations and IDs, and the first lookup resolves them. I found one smaller diagnostic regression while checking that merge. On a warmed `Shader::op` cache hit, the existing debug assertion for DXC function attributes in `declare_op` is bypassed. A local debug regression that calls opcode 35 with `ReadNone` and then `None` failed before the assertion was moved (`should panic` did not panic), and passed after it was moved before the cache lookup. This affects the builder's debug check; I did not find a retail output failure. Suggested diff for the rebase (tested locally, not committed or pushed): ```diff @@ Shader::dispatch_piece rov: self.rov, + op_cache: FastMap::default(), @@ Shader::op pub fn op(&mut self, op: u32, name: &str, overload: Option<Ty>, ret: Ty, args: &[Value], attrs: FnAttrs) -> Value { + #[cfg(debug_assertions)] + if let Some(want) = dxc_fn_attrs(op) { + debug_assert_eq!(attrs, want, "dx.op {op} ({name}) attributes differ from DXC's"); + } let i32 = self.m.i32(); @@ Shader::declare_op - if let Some(want) = dxc_fn_attrs(op) { - debug_assert_eq!(attrs, want, "dx.op {op} ({name}) attributes differ from DXC's"); - } @@ before pops_rov_tests +#[cfg(all(test, debug_assertions))] +mod op_cache_tests { + use super::*; + #[test] + #[should_panic(expected = "attributes differ from DXC's")] + fn cache_hit_still_checks_dx_op_attributes() { + let mut shader = Shader::new(Stage::Compute, (6, 6)); + let i32 = shader.m.i32(); + let a = shader.m.i32c(1); + let call = Shader::op; + call(&mut shader, 35, "binary", Some(i32), i32, &[a, a], FnAttrs::ReadNone); + call(&mut shader, 35, "binary", Some(i32), i32, &[a, a], FnAttrs::None); + } +} ``` On the isolated merge with this diff: `cargo check --offline --locked -p xcl` passed; `dispatch_chain_payload_skips_middle_piece` and the new cache-hit regression each passed **1/0**; `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4` passed **1,428/0/46** across 37 binaries with **25 explicit GPU skips** (21 no native wave64, 3 unsupported f16 forms, 1 no heap windows). This is integration evidence for an uncommitted tree, not a test report for a clean rebased PR head. No title smoke or AMD run was done. AI use: Codex (GPT-6; exact variant unavailable) built and tested the local patch and drafted this comment; GPT-6.2 Astra Low reviewed the merge path.
Author
Owner

@⁠zondy1i on GitHub · 2026-11-26 02:59 UTC · original

Rebased onto current main (b49be183) and fixed the two points from the reports above:

  • The merge with main did not compile (E0063 in Shader::dispatch_piece, which main added after this PR's base): it now starts with an empty op_cache.
  • The debug check of the DXC function attributes now runs before the Shader::op cache lookup, so a cache hit still verifies them; new test shader_op_cache_hit_still_checks_dx_op_attributes.

Full workspace suite on the new head 8fc4de1: 1440 passed, 0 failed; 60 s smoke is in the description. Thanks @⁠thehollowedone and @⁠oni-swr for the reports. The benchmark and the 100/100 byte-identity check are from the previous head (the changes since do not touch the emitted DXIL).

**@⁠zondy1i** on GitHub · 2026-11-26 02:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/2056#issuecomment-7181297834) Rebased onto current `main` (`b49be183`) and fixed the two points from the reports above: - The merge with `main` did not compile (E0063 in `Shader::dispatch_piece`, which `main` added after this PR's base): it now starts with an empty `op_cache`. - The debug check of the DXC function attributes now runs before the `Shader::op` cache lookup, so a cache hit still verifies them; new test `shader_op_cache_hit_still_checks_dx_op_attributes`. Full workspace suite on the new head `8fc4de1`: 1440 passed, 0 failed; 60 s smoke is in the description. Thanks @⁠thehollowedone and @⁠oni-swr for the reports. The benchmark and the 100/100 byte-identity check are from the previous head (the changes since do not touch the emitted DXIL).
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2056/head:github-bot/gh-2056'
git switch 'github-bot/gh-2056'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2056'
git switch 'github-bot/gh-2056'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2056'
git switch 'github-bot/gh-2056'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2056'
git switch 'main'
git merge --squash 'github-bot/gh-2056'
git switch 'main'
git merge --ff-only 'github-bot/gh-2056'
git switch 'main'
git merge 'github-bot/gh-2056'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.