Repository navigation
Conversation
A 16-bit VALU result goes into D[15:0] and leaves D[31:16] as it was, or with VOP3 op_sel[3] into D[31:16] leaving D[15:0], and op_sel[0..2] read the sources' high halves. valu16 does this (`(cur & 0xFFFF0000u) | t`), but only v_add_f16 had a check of it: the other 16-bit tests compare D[15:0] alone. gpu_16_bit_results_keep_the_other_half presets every VDST to 0xCAFE_BABE and runs the 16-bit integer ops of valu16 that RDNA2 has, the op_sel forms the RDNA2 assembler takes (v_add/sub_nc_u16/i16, v_mad_u16/i16), and v_cvt_u16_f16 / v_cvt_i16_f16. The expected values follow what RDNA2 (gfx1036) and RDNA4 (gfx1201) silicon gave for the same instructions as inline assembly through OpenCL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
NVIDIA (32-lane) run, since Not tested lists NVIDIA. Tested
Not tested
AI use
|
|
A run on Linux with vkd3d-proton, where the shaders go through dxil-spirv to Vulkan instead of a Windows driver's DXIL compiler. Tested
Not tested
AI use
|
|
Tested — a8133ad on Windows 11 Pro build 26300, RTX 3070 Ti (driver 610.88),
Result with the default adapter: 1 passed, 0 failed, 0 ignored, 719 filtered out.
Not tested — AMD reference hardware, native wave64, or AI use — DeepSeek Harness (DeepSeek V4.1 Flash) ran the tests and drafted this report. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
A 16-bit VALU result goes into D[15:0] and leaves D[31:16] as it was, or with VOP3
op_sel[3]into D[31:16] leaving D[15:0].op_sel[0..2]read the sources' high halves.valu16does this ((cur & 0xFFFF0000u) | t,emit.rs~3051), but onlyv_add_f16has a check of it ingpu_valu_16_and_64_bit. The other 16-bit tests, including #638 and #639, compare D[15:0] alone. A change that zeroed or overwrote the other half would pass all of them.The expected behaviour is measured on RDNA2 silicon, the console's generation, not taken from the ISA text: #638 (comment), plus the op_sel forms below.
What is in it
crates/xcl/src/gpu/recomp/tests.rs:gpu_16_bit_results_keep_the_other_half. Every VDST starts at0xCAFE_BABE. Each source has different values in its two halves. 24 rows:valu16that RDNA2 has, plain VOP3:v_add/sub_nc_u16/i16,v_mul_lo_u16,v_lshlrev/lshrrev_b16,v_ashrrev_i16,v_min/max_u16/i16,v_mad_u16/i16.v_subrev_nc_u16is left out: the RDNA2 / RDNA4 assembler refuses it.v_add/sub_nc_u16/i16,v_mad_u16/i16): writing D[31:16], reading the high halves, both.v_cvt_u16_f16/v_cvt_i16_f16(VOP1), f16 source with0xBEEFin its high half.Tested
XCL_ADAPTER: AMD Radeon iGPU of a Ryzen 7 9800X3D (gfx1036, RDNA2, native wave64, driver 32.0.21045.29003) and AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32029.2010). Windows 11 Pro 26200, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug.cargo test --workspace --no-fail-fast -- --test-threads=4ona8133ad: 742 passed, 0 failed, 41 ignored on each GPU, noSKIPPED(main47efa2e: 741 / 0 / 41 on each).XCL_REQUIRE_GPU=wave64: 3 / 3 passed on each GPU.valu16, reverted after:twritten alone): 108 failing rows, e.g.V_ADD_NC_I16 … got 0x00000000, want 0xcafe0000.op_sel[3]ignored: 36 failing rows (got 0xcafef777, want 0xf777babe).op_selsource bits ignored: 35 failing rows.0xCAFEBABE, wave32 and wave64. Every form the assembler accepted matches the rule above on both GPUs.Regression run
tests.rs), no runtime regression run.Not tested
v_mul_lo_u16, the shifts, min / max): the RDNA2 assembler refuses it, so there is no hardware reference for it.clamp, the console itself (gfx1036is a desktop RDNA2 APU of the same generation).AI use
🤖 Generated with Claude Code