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).
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.