Recompiler: translate v_qsad_pk_u16_u8 and v_mqsad_{pk_u16,u32}_u8 in both backends (takes over #909) #2334
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!2334
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2334/head"
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?
@NWProgramming00 on GitHub · 2026-11-25 14:57 UTC · original
NWProgramming00:recomp/qsad→main· +311 −1 · 4 files · 2 commits · merged 2026-11-25 18:37 UTCBoth backends refused
v_qsad_pk_u16_u8,v_mqsad_pk_u16_u8andv_mqsad_u32_u8. This takes over #909 by @bigiello, which its author closed along with their other open PRs on 24.11 while it was waiting only for a regression run. Their commit is kept as it was, with its authorship. On top of it, this adds the same translation to the direct DXIL backend, checks both backends against RDNA2 hardware, and adds the regression run.What is in it
95f6c1a(@bigiello, unchanged from #909):Em::valu_qsadand apk_sad_u16prelude helper incrates/xcl/src/gpu/recomp/emit.rs, plus the testsqsad_and_mqsad_operand_forms_and_validationandgpu_qsad_and_mqsad.c0eaeff:Lw::valu_qsadincrates/xcl/src/gpu/dxil/lower_wide.rs, dispatched fromlower_valu.rs.valu_qsad: the four 4-byte windows of the 64-bit SRC0 against SRC1, withmqsadskipping SRC1's zero bytes._pk_u16) or 32-bit (_u32) element of SRC2, saturating per element with CLAMP.gpu_qsad_and_mqsadnow runs both backends in wave32 and wave64.Tested
XCL_ADAPTER=radeon). Rust 1.100 MSVC, release.gpu_qsad_and_mqsadpasses on both adapters. It fails with each of six deliberate mistakes:mqsaddropped (direct DXIL);pk_sad_u16without saturation (HLSL).cargo build --release --workspace, thencargo test --release --workspace --no-fail-fast -- --test-threads=4, with and withoutXCL_DIRECT_DXIL=all, against base06c9f55on the same machine:06c9f55c0eaeff)XCL_DIRECT_DXIL=allXCL_DIRECT_DXIL=allThe +2 are #909's two tests. The same tests fail on both sides, and all of them are tracked:
fuzz_validate_and_gpu_0..3on NVIDIA (#1905);fuzz_validate_and_gpu_1on RDNA2 (#2115);offline_compute_pipeline_is_reused_by_a_second_processwith direct DXIL (#1674).Regression run
Base (
main06c9f55), NVIDIA GeForce RTX 5070 Ti:This PR (
c0eaeff), same card:Not tested
AI use
🤖 Generated with Claude Code
@nnonno91 on GitHub · 2026-11-25 15:06 UTC · original
Independent exact-head verification of
c0eaeff7046ebb8e5384673c661920d7a9d76cffon Radeon integrated graphics and RTX 5090.Tested
cargo test --locked -p xcl --lib qsad_and_mqsad -- --nocapture --test-threads=1withXCL_ADAPTER=AMD RadeonandXCL_ADAPTER=NVIDIA GeForce RTX 5090in separate processes. Both gave 2 passed, 0 failed, 0 ignored and no skips.Not tested
The separate HIP hardware capture, retail inputs, the parent and the full workspace suite.
AI use
OpenAI Codex (GPT-6.2 Sol) ran the checks and wrote this report.
@luckyteagirl on GitHub · 2026-11-25 15:41 UTC · original
Independent focused check of exact head
c0eaeff7046ebb8e5384673c661920d7a9d76cffon Windows 11 build 26200, discrete AMD Radeon RX 6800M (driver30.0.13002.13003), Rust 1.99 MSVC, DXC/DXIL 1.9.2609.5.With
XCL_ADAPTER=6800MandXCL_REQUIRE_GPU=wave64,cargo test --locked -p xcl --lib qsad_and_mqsad -- --test-threads=1 --show-outputon the clean PR head gave 2 passed, 0 failed, 0 ignored, 0 explicit skips. The GPU fixture runs both HLSL/DXC and direct DXIL in wave32 and wave64, checking all three QSAD/MQSAD instructions, CLAMP and wrap results, overlapping operands, and EXEC-inactive lanes. The operand-form validation test also passed.A temporary diagnostic print in the fixture confirmed
AMD Radeon RX 6800Mandnative wave64: true; its run also passed 2/2. I restored that print and repeated the clean-head run above; the checkout is clean. The diagnostic only identified the device and wave capability, and is not part of the PR.This adds a discrete RDNA2 and older driver to the author and other reviewers' checks. I did not perform a separate HIP hardware capture, full workspace suite, or retail-title smoke comparison for this PR.
AI use: OpenAI Codex (GPT-6) ran the checks and prepared this report.
@DavidM1911 on GitHub · 2026-11-25 18:04 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!