shader: lower v_dot8_i32_i4 and v_dot8_u32_u4 in the direct compute path #3079
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3079
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3079"
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?
@R0D4X on GitHub · 2026-11-27 14:32 UTC · original
R0D4X:feat/native-packed-dot8→main· +198 −0 · 4 files · 2 commits · merged 2026-11-27 17:43 UTCFixes #3077. Refs #2935.
What this changes
v_dot8_i32_i4(0x18) andv_dot8_u32_u4(0x19) insrc/gfx1013_direct_compute.inl:shl/ashr 28, unsigned vialshr/and 15), sums the eight products (always fits ini32), and either wraps modulo 2^32 or saturates the final accumulator addition viasaturated_addwhenclampis set.OP_SEL/OP_SEL_HIand zeroNEG_LO/NEG_HI, refusing other modifier encodings withunsupported packed nibble dot operand modifiers.Tests & docs added
tests/native_packed_dot8_check.py&tests/cmake/native_packed_dot8.cmake: DXIL compile & disassembly controls, five modifier refusal encodings, andnative_store_replayhardware dispatches (dense, sparseEXEC, and no-clamp negative control across 8 patterns x 4 forms = 2,048 words + 16 guards).docs/experiments/native-packed-dot8.md: semantics and reproduction commands.Verification
Commit:
6310d7e9on Windows 11 x64 (10.0.26300.9974), MSVC19.44.35230, Windows SDK & DXC10.0.26100.0,NVIDIA GeForce RTX 5080(10de:2c02, driver32.0.16.2124), SM 6.6 wave32:ctest --preset dev --no-tests=error -R '^native_packed_dot(2|4|8)_' -V: 6/6 passed, 0 skippednative_packed_dot8_hardware:sparse=Falseandsparse=Truematched 2048 result words and 16 guards; no-clamp control differed on 224 words.ctest --preset release --no-tests=error -R '^native_packed_dot(2|4|8)_': 6/6 passed, 0 skippeddocs_links_check.py,bidi_controls_check.py,git diff --check): all passed.Scope: Covers synthetic
v_dot8_i32_i4/v_dot8_u32_u4wave32 compute fixtures throughcompile_dxilandnative_store_replay; does not establish full-title startup or runtime execution.6310d7e999to35d01f598f@tedin7 on GitHub · 2026-11-27 17:43 UTC · original · reviewed
Review of
69e8ae20ba(the change from35d01f59, updated with main; the PR's own diff is unchanged).Code: the lowering reads the eight nibbles of each word (signed with
shl+ashr 28, unsigned withlshr+and 15), sums the eight products in i32 (range fits), and saturates only the final accumulator add when clamp is set. The modifier guard accepts only canonical OP_SEL/OP_SEL_HI with zero NEG_LO/NEG_HI; the five refused encodings in the controls cover op_sel, op_sel_hi and neg bits on both words. The CPU reference in the test is computed independently of the lowering, and the no-clamp and sparse-EXEC controls change the expected words. No other open PR covers these two opcodes in the direct compute path.Windows Server 2025 (Build 26100, MSVC 14.44.35207, D3D12 WARP) at commit
69e8ae20:cmake --build --preset dev --target compile_dxil native_store_replay, thenctest --preset dev -R <native sweep>: 100% tests passed out of 126 (73 passed, 53 hardware legs skipped with 77)cmake --build --preset release --target compile_dxil native_store_replay, thenctest --preset release -R <native sweep>: 100% tests passed out of 126 (73 passed, 53 skipped)<native sweep>is everynative_*test exceptnative_startup_request_cache_hardware. That test fails the same way with and without this PR on a WARP-only host ("Shader wants wave lane count of 32 but maximum wave lane count for device is 4"); it comes from #2955 and is not related to this change.native_packed_dot8_controlspassed in both presets.native_packed_dot8_hardwareskips on WARP (it needs a physical wave32 adapter), so the GPU readback rests on the RTX 5080 run in the PR description.AI-assisted; commands listed were executed locally.
@tedin7 on GitHub · 2026-11-27 17:43 UTC · original
Windows Server 2025 verification of
69e8ae20ba85ff8b95d2d0ecb8939539a02919ea(D3D12 WARP, MSVC 14.44.35207):cmake --build --preset dev --target compile_dxil native_store_replay;ctest --preset dev -R <native sweep>: 100% tests passed out of 126 (73 passed, 53 hardware legs skipped)cmake --build --preset release --target compile_dxil native_store_replay;ctest --preset release -R <native sweep>: 100% tests passed out of 126 (73 passed, 53 skipped)<native sweep>= everynative_*test exceptnative_startup_request_cache_hardware, which fails on WARP-only hosts with or without this PR (details in the review above).AI-assisted; commands listed were executed locally.