Recompiler: saturate packed unsigned dot8 without i64 #2221
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2221
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2221"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@luckyteagirl on GitHub · 2026-11-25 10:18 UTC · original
luckyteagirl:codex/dot8-clamp-32→main· +37 −6 · 3 files · 1 commits · openPart 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.
@raylitebull on GitHub · 2026-11-25 10:47 UTC · original
4830018currently conflicts intests.rsagainst recentmainmerges. Please rebase ontomain(and add dual-vendor GPU test runs on the rebased head) before CI runs.@oni-swr on GitHub · 2026-11-25 13:02 UTC · original
Test report: AMD Radeon RX 7800 XT (RDNA3, native wave64) for head
404cde36a101d3502504f679db7e6528b08dc19a.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 (
dxcon PATH). Detached checkout of the PR head, which includesea088a5. I did not merge it with currentmain. I read the diff before running it.Targeted (
cargo test -p xcl --lib -- dot --nocapture --test-threads=1,XCL_DIRECT_DXILunset): 6 passed, 0 failed, 0 ignored.dxil::core_tests::dot8_u32_u4_lowers_to_dot4_add_u8_packeddxil::ops_tests::dot4_add_u8_packed_matches_cpurecomp::tests::gpu_v_dot8_u32_u4_edge_casesrecomp::tests::gpu_v_dot8_u32_u4_clamped_overflowrecomp::tests::gpu_packed_math_dots_movrelresolvertest matched by the filterI also ran
-- dot8withXCL_DIRECT_DXIL=1: 3 passed, 0 failed (the twogpu_v_dot8_u32_u4_*tests plus the DXIL lowering test).Full suite (
cargo test --workspace --no-fail-fast -- --test-threads=4, env unset): 1253 passed, 1 failed, 46 ignored.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, the known RDNA3 failure onmain. The PR does not touch it.SKIPPEDlines: 6 inlower_dxil::tests(f16 / f32 conversion programs refused) andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows). These are not coverage.Not tested: retail title or
scripts/smoke.ps1, NVIDIA, Intel, Wine/vkd3d, this PR merged with currentmain.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.
@jennydeth on GitHub · 2026-11-25 14:22 UTC · original
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.
@DarkPanda69 on GitHub · 2026-11-25 13:41 UTC · original · edited 2026-11-25 21:37 UTC
Update for head
89d71f2: rerun onmain6d12f58, same command and cards.gpu_v_dot8_u32_u4_clamped_overflowandgpu_v_dot8_u32_u4_edge_cases(now onmain) ok on both. RTX 3060: 701 passed, 0 failed, 24 SKIPPED. RX 9070 XT: 699 passed, 2 failed (the #2115 fuzz seeds), 6 SKIPPED. Both skip counts are the same as onmain.NVIDIA run on this rebased head (requested by the reviewer), plus AMD with native wave64: both new tests pass on both cards.
Head
404cde3applied onmain379725a, debug, Windows 11 Pro 26200,cargo test -p xcl --lib -- gpu:: --test-threads=4:gpu_v_dot8_u32_u4_clamped_overflowandgpu_v_dot8_u32_u4_edge_casesok. 635 passed, 0 failed, 22 ignored.main.Not tested: other NVIDIA generations, a title.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@thehollowedone on GitHub · 2026-11-26 01:46 UTC · original · edited 2026-11-26 07:00 UTC
Independent Windows/NVIDIA check of #2221 head
89d71f2and a clean current-mainb49be18control. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / driver 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11.Tested
cargo test --offline --locked -p xcl --lib dot8_u32_u4 -- --nocapture --test-threads=1passed 3/0/0, no skips.cargo build --offline --locked --workspacepassed.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4passed 1,424/0/46, with 25SKIPPEDnotices.SKIPPEDnotices. TheInvalid bitcode signatureline is from a passing malformed-container test.XCL_NETWORK=0,XCL_RUN_SECONDS=60,XCL_ACTIVITY=1, the RTX 3080 Ti selected, no injected input, and a separate fresh XCL data root. A Windows Job Object capped each process at 16 GiB committed; an external guard required 8 GiB system commit headroom and had a 100-second timeout. Both reached XCL's 60-second end marker and exited normally. I extracted the standard smoke counters from their logs; this was a guarded equivalent run, not an invocation ofscripts/smoke.ps1.Main:
PR:
Not tested
AI use
Repeat workspace suite on current baseline (26 Nov 2026)
I reran the exact PR head
89d71f2and latest mainb49be18. The PR still targetsmainat base6d12f58; it has not been rebased onto the latest main.cargo build --offline --locked --workspacepassed. The full suite reported 1,423 passed, 1 failed, 46 ignored, with 25SKIPPEDnotices.gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, withcached_only console_mesh hit: "DXIL not compiled yet".SKIPPEDnotices. The same test failed with the same message.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.
@DavidM1911 on GitHub · 2026-11-26 08:15 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.