Repository navigation
Conversation
|
Per |
2a2d704 to
355c7cf
Compare
|
Independent verification, merged onto current Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC dxcompiler 1.8.2502.11. The PR breaks an existing GPU test. The clamped dot products now emit
So the hardware lowering is fine for the wrap case but the clamp path needs a different shape (e.g. keep the AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
|
Test run of Tested
Not tested
AI use
|
355c7cf to
d3ea666
Compare
|
Thanks for the feedback and confirmation on the DXC version discrepancy (@DavidM1911, @throny). The root cause of the DXC internal compiler error was AST scalar lowering in CGExprScalar.cpp: when a built-in intrinsic like dot4add_u8packed or dot4add_i8packed is directly enclosed in a 64-bit widening cast as an operand of a binary addition, DXC fails during scalar promotion in certain compiler builds (such as DXC 1.8.2502.11 and early Windows SDK 10.0.26100.0). We resolved this by isolating the intrinsic lowering in two dedicated preamble helpers:
Both gpu_dp4a_dot_products_hardware_lowering and gpu_clamp_and_omod_per_instruction compile and execute cleanly on hardware. Pushed to branch �rc-dp4a-uma as commit d3ea666. CI check is green. |
|
Rerun on the new head Tested
Not tested
AI use
|
# Conflicts: # crates/xcl/src/gpu/recomp/tests.rs
d3ea666 to
df490c1
Compare
This pull request lowers clamped 8-bit dot products directly to hardware DP4a intrinsics:
In
crates/xcl/src/gpu/recomp/emit.rs, clamped dot products (v_dot4_u32_u8andv_dot4_i32_i8) previously fell back to 4-iteration scalar software loops (dot4_u8anddot4_i8). We introduce helper functions (dot4_u8_clampanddot4_i8_clamp) that lower directly to SM 6.4dot4add_u8packedanddot4add_i8packed.For unsigned clamped dots,
dot4add_u8packed(a, b, c)is accumulated directly in hardware and clamped viaselect(r < c, 0xFFFFFFFFu, r)without 64-bit casts. For signed clamped dots,dot4add_i8packed(a, b, 0)is isolated to a 32-bit SSA register before widening tosat_i32, eliminating the AST scalar promotion ICE in DXC 1.8.2502.11 / Windows SDK 10.0.26100.0. This unlocks native hardware DP4a execution on Intel Arc Xe-cores (and RDNA/NVIDIA architectures supporting SM 6.4).Added dedicated hardware instruction test
gpu_dp4a_dot_products_hardware_loweringincrates/xcl/src/gpu/recomp/tests.rsexercising both saturating and non-saturating paths for clamped and unclamped dot products on hardware GPU runner.Per review on #985, sparse UMA chunk scanning has been split into a separate pull request (#1058).
Tested
cargo test --workspace(672 passed, 0 failed, 21 ignored in lib; 13/13 console_dlls_e2e passed; 3/3 console_shaders passed; 1/1 disasm_e2e passed; 3/3 e2e passed; 1/1 sparse_reinit passed; 1/1 texture_states passed; 6/6 xg_oracle passed)gpu::recomp::tests::gpu_dp4a_dot_products_hardware_lowering: passed on Intel Arc hardware GPU runner with bit-exact results.Regression run
main(beaa245):PR (
df490c1):Not tested
AI use