Repository navigation
Recompiler: saturate packed unsigned dot8 without i64 - #2221
luckyteagirl wants to merge 1 commit into
Conversation
|
|
d528390 to
404cde3
Compare
|
Test report: AMD Radeon RX 7800 XT (RDNA3, native wave64) for head Setup: RX 7800 XT, driver 32.0.31035.1003, Windows 11 Pro 10.0.26200, rustc/cargo 1.100.0, debug build, DXC 1.9.0.5512 ( Targeted (
I also ran Full suite (
Not tested: retail title or AI use: this report was run and written by Claude Code (Claude Sonnet 5.5). I read the diff but did not change any code. |
|
Update for head NVIDIA run on this rebased head (requested by the reviewer), plus AMD with native wave64: both new tests pass on both cards. Head
Not tested: other NVIDIA generations, a title. |
|
NVIDIA run on this head (requested in Not tested). Setup: RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head 404cde3. Result: cargo test --workspace -- --test-threads=4: 1254 passed, 0 failed, 46 ignored. The dot8 tests pass: dot8_u32_u4_lowers_to_dot4_add_u8_packed, gpu_v_dot8_u32_u4_clamped_overflow, gpu_v_dot8_u32_u4_edge_cases. SKIPPED: 18 GPU tests for no wave64 (expected on this card). One note, likely unrelated to this PR: the first full run aborted in hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels with misaligned pointer dereference: address must be a multiple of 0x8 but is 0x74100001 (windows-core interface.rs:41, STATUS_STACK_BUFFER_OVERRUN). It did not reproduce in three title_textures reruns or in the full rerun above. AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report. |
The unsigned four-bit dot products total at most 1800. The clamped path can accumulate that bounded sum with Dot4AddU8Packed and saturate c + sum using a 32-bit carry check. This avoids the old wide-sum DXIL that suspends the RX 6800M device in the focused GPU fixture. Add an isolated clamped overflow regression alongside the existing combined edge cases.
404cde3 to
89d71f2
Compare
|
Independent Windows/NVIDIA check of #2221 head Tested
Main: PR: Not tested
AI use
Repeat workspace suite on current baseline (26 Nov 2026)I reran the exact PR head
This repeat was not fully green, unlike the earlier full-suite run recorded above. The same failure on latest main means this run does not identify a PR-specific regression. No retail smoke was run in this repeat. AI use: Codex (GPT-6.2 Sol) reran and compared these tests and drafted this update. AI-assisted. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
…2221) Shared test vector: v_dot8_u32_u4 with CLAMP=1 saturates instead of wrapping (eight nibble products sum to at most 1800, so only c + t can overflow). The DXIL-emit half stays out; the rule is for the SPIR-V lowering of clamped VOP3P dot (no Int64 capability needed).
|
Independent desktop NVIDIA verification of PR #2221 at head Environment
Targeted release tests & build (
|
| Command | Result |
|---|---|
cargo test --release -p xcl --lib dot8_u32_u4_lowers_to_dot4_add_u8_packed -- --nocapture (3 consecutive runs) |
1 passed; 0 failed; 0 ignored; 1324 filtered out × 3 (0.01s × 3, 0 skipped) |
cargo test --release -p xcl --lib gpu_v_dot8_u32_u4_clamped_overflow -- --nocapture (3 consecutive runs) |
1 passed; 0 failed; 0 ignored; 1324 filtered out × 3 (0.22s, 0.20s, 0.20s, 0 skipped; live RTX 4060 execution) |
cargo test --release -p xcl --lib gpu_v_dot8_u32_u4_edge_cases -- --nocapture (3 consecutive runs) |
1 passed; 0 failed; 0 ignored; 1324 filtered out × 3 (0.21s, 0.20s, 0.20s, 0 skipped; live RTX 4060 execution) |
cargo test --release -p xcl --lib gpu::dxil:: -- --test-threads=4 (3 consecutive runs) |
183 passed; 0 failed; 3 ignored; 1139 filtered out × 3 (3.63s, 3.91s, 3.59s; 1 self-skipped: gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole — no wave64 on Wave32-only Ada; 182 executed) |
cargo build --release -p xcl |
Clean build (1m 11s, exit 0, 0 new warnings) |
Paired quiet 60 s retail smoke (title: 29640639)
Exact parent & merge-base (6d12f58a229bc73889878a448c64dc3af25eeba0, cached baseline on the same machine):
xcl-smoke v1
commit: 6d12f58a229bc73889878a448c64dc3af25eeba0
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1606 (PresentX 1606)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14004 MB
PR #2221 (89d71f2d3c8c941dc992dd916517b4267043ecc1):
xcl-smoke v1
commit: 89d71f2d3c8c941dc992dd916517b4267043ecc1
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1589 (PresentX 1589)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14022 MB
Runtime log observations (xcl.log)
9221log lines,0[ERROR]/ device-removal / panic lines (dxil_cache:460hits,0misses,0compilation failures;228background pipelines,0failures).- Final draw/memory telemetry in log:
19561 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14021 MB committed by the process; video memory 6116 MB local, 4683 MB non-local.
Limits of coverage
- The 32-bit carry-saturated
Dot4AddU8Packedlowering forV_DOT8_U32_U4(avoidingi64) was directly verified on desktop RTX 4060 viadot8_u32_u4_lowers_to_dot4_add_u8_packed,gpu_v_dot8_u32_u4_clamped_overflow, andgpu_v_dot8_u32_u4_edge_cases(3/3each,0skipped), plusgpu::dxil::(182executed,0failed,1Wave64-only test self-skipped on Wave32-only Ada). - This report verifies NVIDIA Ada (
RTX 4060) correctness and non-regression (single-run retail smoke frame/commit delta reflects normal startup variance, not this PR); it does not independently test the AMD RX 6800M device-suspension repro referenced in the commit message.
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
|
RX 9070 / RADV / Wine verification of exact head Tested
All 12 original-filter runs report 3 passed, 0 failed: lowering test, edge cases and clamped overflow. Both GPU tests run in native wave32 and native wave64. The isolated clamped core shader has 0 packed Dot4 calls on main, 2 on head/integration; the unclamped core shader has 2 on every source. Its SFI0 Int64 bit is set only for main's clamped version. Additional owned filter
Each pair uses eight accumulator values: 0, 1, All 2,359,296 active matrix results match the independent integer reference: sum the eight unsigned nibble products, add the accumulator, then either cap at The owned direct matrix has 16 packed Dot4 calls on main and 18 on head/integration; the shader requirement changes from Int64 set to clear. HLSL controls retain Int64 and produce the same numbers. These are code-generation observations, without a timing claim. Across both groups: 3,522 captured GPU dispatches, including 18 physical-width probes and 1,185 native-wave64 dispatches. Independently verified 9,589,248 words, including result/input registers, inactive lanes, 16 SGPR and 16 VGPR guards, unchanged SCC and complete memory readbacks. Original and owned programs were independently re-encoded from the public ISA tables; shader metadata and physical widths agree. 0 ignored, 0 skipped, no device-removal markers. Inherited Not tested The native-Windows RX 6800M PSO-creation suspension, full suite, signed dot forms or packed modifiers, split-wave64/per-lane translation, guest Compute ABI integration, native Windows, other GPUs, retail workload, AI use OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the diff, wrote the owned test-only matrix and captures, ran comparisons, independently verified nibble products, overflow boundaries, shader flags, guards, wave widths and source/executable provenance, and drafted this report. Publication authorized by the account owner. |
|
Thanks, @raylitebull. I rebased the clamped-dot8 change onto main at The focused dot8 tests passed on my RX 6800M and independently on the RX 9070 XT and RTX 3060. The RTX 3080 Ti exact-head run also passed the focused tests and a full workspace run (1,424 passed, 0 failed, 46 ignored). Its repeat hit the same mesh cache failure on the PR and clean main. My RX 6800M workspace run remains incomplete because the library process aborted, and the isolated raw-load test also aborted on main. AMD and NVIDIA results · RTX 3080 Ti workspace runs The Windows CI and latest PR-description check both passed for this head. Windows CI · PR-description check AI use: Codex (GPT-6.2 Sol) checked the revision, test reports, and CI status and helped draft this reply. |
Part of #1269. #2173’s unclamped packed lowering is now on
main, so this rebased PR contains only the clamped unsigned dot8 saturation change. The eight unsigned nibble products sum to at most 1,800; the clamped form can accumulate them with packed 32-bit dot calls and saturate the addition to the incoming accumulator without the old 64-bit sum. That old clamped path suspended the RX 6800M device during compute PSO creation in focused testing.What is in it
crates/xcl/src/gpu/dxil/lower_wide.rs: extend the packed dot lowering onmainto clampedv_dot8_u32_u4; detect unsigned overflow inc + product_sumand selectu32::MAX.crates/xcl/src/gpu/dxil/core_tests.rsandcrates/xcl/src/gpu/recomp/tests.rs: check clamped packed-call codegen and GPU zero, boundary, and overflow cases.Tested
89d71f2d3c8c941dc992dd916517b4267043ecc1onmain6d12f58a229bc73889878a448c64dc3af25eeba0. Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (driver30.0.13002.13003), Rust 1.99.0 MSVC, DXC/DXIL 1.8.2502.11.cargo test -p xcl --lib dot8_u32_u4 -- --test-threads=2 --show-outputwithCARGO_BUILD_JOBS=2and an isolated target: 3 passed, 0 failed, 0 ignored, 0 skipped (1,322 filtered). The compiler/disassembly check and both GPU edge/clamp fixtures ran.cargo build --locked --release -p xcl --bins -j 2: passed on the rebased head.cargo test --locked --workspace --no-fail-fast -j 2 -- --test-threads=4 --show-outputwas attempted on this head. The library target exited0xc0000005before a test summary. Across 36 targets that did finish, Cargo reported 124 passed, 1 failed, 20 ignored, with 4 explicit skips; these are partial counts, not whole-suite totals. The one reported failure was the warm driver-cache expectation inoffline_split_compute_pipeline_is_reused_by_a_second_process.raw_loads_in_root_windows_respect_exec_and_boundsexited0xc0000005individually on both (no test summary); the warm-cache test failed on main (0 passed, 1 failed; expected 5 cached pieces, saw 0) and passed on this branch (1 passed, 0 failed). The full library rerun with one test thread still exited at the raw-load test. These checks do not identify a branch-specific failure.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4. The clean exact PR head89d71f2reported 1,424 passed, 0 failed, 46 ignored. A separate local, uncommitted merge of that head intomainatb49be18reported 1,436 passed, 0 failed, 47 ignored. Each run logged 25 explicitSKIPPEDnotices, and the focused dot8 filter passed all three tests with no skips on both trees. Independent reportmainb49be18separately. The PR head reported 1,423 passed, 1 failed, 46 ignored and clean main reported 1,434 passed, 1 failed, 47 ignored, with 25 explicitSKIPPEDnotices per run. Both failedconsole_mesh_caches_hlsl_compute_pass_in_memory_and_on_diskwithcached_only console_mesh hit: "DXIL not compiled yet". The three focused dot8 tests still passed on the PR head. Repeat run and main controlgit diff --check: clean.Regression run
The committed release binaries for main at
6d12f58and this PR ranscripts/smoke.ps1on the same owned title for seven seconds each, with separate fresh data and DXIL caches. Both ended normally with no crash, device removal, or memory-guard trigger. These runs reached intro frames but did not show a dot8 dispatch; the focused GPU fixtures exercise that opcode.Main at
6d12f58:This PR:
Not tested
AI use
OpenAI Codex (GPT-6; exact variant unavailable) investigated the RX 6800M failure, wrote the 32-bit clamp and regression tests, rebased the remaining commit after #2173 merged, ran the GPU checks, failure controls and guarded smoke pair, and drafted this description.
OpenAI Codex (GPT-6.2 Sol) verified the independent report against the current PR head and drafted this description update.