Repository navigation
Recompiler: direct DXIL v_cmp_class_f16 reads the mask half OP_SEL[1] picks (stacked on #1214) - #1980
regiumlepidi wants to merge 2 commits into
Conversation
In V_CMP_CLASS_F16 (rdna2_spec.rs), SRC1 is a 16-bit operand so OP_SEL[1] == 1 selects its upper 16-bit half as the class mask. The emitter applied half(0, &ua) to SRC0 but passed ub unchanged, ignoring OP_SEL[1]. Select SRC1 via half(1, &ub), with a GPU test covering OP_SEL[1]=0/1 and OP_SEL=3 across wave32 and split wave64. Assisted-by: OpenCode (Gemini 4 Neon)
… picks The direct DXIL translator (XCL_DIRECT_DXIL=1) shifted the whole 32-bit SRC1 by the class index in v_cmp_class_f16, so OP_SEL[1] never selected the mask's high half, as the HLSL path did before xcl-dev#1214. Take the half OP_SEL[1] picks, as xcl-dev#1214 does in the HLSL path. xcl-dev#1214's GPU test failed with XCL_DIRECT_DXIL=1 on an RTX 5070 Ti and passes with this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
AMD run with native 64-lane waves, which this PR lists as not tested (the author's GPU runs wave32 only). Tested: pass, head
Not tested: release build; the whole workspace suite; a title. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Arc A770 verification for XCL PR #1980 2026-11-25 | STOR-WINLAB | 8b5aea7 Tested Windows 11 Enterprise Evaluation 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175. Rust and Cargo 1.100.0 (x86_64-pc-windows-msvc). Both runs logged dxcompiler and DXIL 1.9.2609.5. The test profile was unoptimized with debug info disabled. Prebuilt outside the Arc mutex with cargo test --locked -p xcl --lib --no-run (exit 0, 40.06 s). CARGO_TARGET_DIR=L:/XclTooling/pr2014-1c971de6/target, CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0. XCL_ADAPTER=A770 and XCL_DXC_DIR=$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64. TEMP and TMP used build-temp, test-0-temp, or test-1-temp under L:/XclTooling/pr1980. Each invocation below ran in its own powershell.exe -NoProfile -ExecutionPolicy RemoteSigned process, with the indicated XCL_DIRECT_DXIL setting and separate stdout and stderr logs from process start. HLSL + DXC (0) and direct DXIL (1) each exited 0 with 1 passed, 0 failed, 0 ignored, 0 measured, 969 filtered out, and 0.19 s elapsed. Total 2 passed, 0 failed, 0 ignored, 0 skips. Neither stream contained a skip notice. The fixture selects direct DXIL without fallback for setting 1. Both processes exercised native wave32. The earlier #2089 capability probe on this host and driver measured a wave lane range of 8–32. At this revision the fixture's gpu_waves() helper adds wave64 only when hardware supports it natively. The synthetic program used v0=0x00003C00 (low FP16 +1.0), v1=0x01000000 (high positive-normal class mask 0x0100, low mask 0), and v2=0x3C000000 (high FP16 +1.0, low +0.0). Each backend asserted (SGPR low, high) masks of (0xFFFFFFFF, 0) for OP_SEL=2 (low SRC0, high SRC1), (0, 0) for OP_SEL=0 (both low), and (0xFFFFFFFF, 0) for OP_SEL=3 (both high). Build and test stdout/stderr logs are in L:/XclTooling/pr1980. Both wrappers logged lock release. The final Arc mutex release was at 04:53:08 CET and the target slot L:/XclTooling/pr2014-1c971de6/target is released for reuse. Not tested Other fixtures or FP16 classes, native or split wave64, other adapters, release builds, the workspace suite, fuzz tests, ancestor controls, and real-title smoke tests. AI use T3 Code / Codex (gpt-6.2-sol) ran the fixture in both backends, inspected its assertions and the logs, and wrote this report. |
|
Regression run of Against the limits in CONTRIBUTING.md: 100 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
Stacked on #1214. Part of #1269.
#1214 makes
v_cmp_class_f16read the class mask from the half that OP_SEL[1] picks for SRC1, in theHLSL path (
recomp/emit.rs). The direct RDNA2 -> DXIL translator (XCL_DIRECT_DXIL=1,gpu/dxil/lower_valu.rs) still read the low half, so the PR's own GPU test fails there(
(0,0)instead of(4294967295,0)). This adds the same rule to the direct path.What is in it
main(its head predatesgpu/dxil/)half(self, 1, ub)and shifts thatIf #1214 merges first, only the second commit remains; if the author prefers to take it into #1214, this can be closed.
Tested
cargo test --workspace -- --test-threads=4, default path: 941 passed, 4 failed, 25 ignored (23 SKIPPED GPU tests); the new test passesXCL_DIRECT_DXIL=1: 941 passed, 4 failed, 25 ignored (23 SKIPPED); the new test passesfuzz_validate_and_gpu_*failures are the same onmainon this machine (DXIL GPU fuzz tests reproducibly fail with E_OUTOFMEMORY on RTX 5060 #1905, E_OUTOFMEMORY on this driver)gpu_cmp_class_f16_honours_opsel1withXCL_DIRECT_DXIL=1on the first commit alone: FAILED (so the second commit is what fixes it)Regression run
Run by @Toons29 on a retail title, AMD Radeon RX 9070, release build, 60 s (#1980 (comment)); blocks as posted there. Within the CONTRIBUTING.md limits: frames 100 % of
main, no crash, no device removal.main:
PR:
Not tested
AI use
regiumlepidiaccount at the account owner's request.🤖 Generated with Claude Code