Repository navigation
Translator: v_dot4_i32_i8 and v_dot4c_i32_i8, confirmed on RDNA2 hardware (17 of 29 FSPX programs translate, 13 before) - #1754
Merged
Conversation
…ware The 29 FSPX programs of the upscaler DLL use the two signed-byte dot products 27,271 times, all in 13 programs, and the translator had neither. The rule: the sum of the four products of the sign-extended bytes of two dwords, plus the third source (v_dot4_i32_i8) or the destination's old value (v_dot4c_i32_i8), modulo 2^32. Confirmed on gfx1036 with raw kernels through tools/hw_oracle: 10 operand sets, both instructions, both source orders of the accumulating one. Two modifiers were measured and are refused: clamp saturates to a signed 32-bit value, and op_sel 2 with op_sel_hi 5 (the 89 words llvm-mc does not decode) exchanges the 16-bit halves of the second source. The measured words are the tables of tests/semantic/test_alu_dot4_i8.py. With tools/fspx_unpack.py on version 1.0.2.1: 17 of the 29 programs translate and pass spirv-val, 13 before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 22, 2026
aslan2142
marked this pull request as ready for review
November 22, 2026 14:33
|
Tested
|
|
Tested 7ffe3a9 on NVIDIA GeForce RTX 2060 SUPER (Turing), NVIDIA 615.78.08, Vulkan 1.4.351, Fedora 44, native Linux build, llvm-mc 22.1.8: pass, at the head and merged onto current The head is 162 commits behind
Skips are the 64-wide subgroup tests (this device is 32..32) and the ones run by the D3D12 tests. No GPU test runs AI-assisted (Claude Code). |
aslan2142
added a commit
to aslan2142/Leonida
that referenced
this pull request
Nov 22, 2026
… programs The paragraph still said 13, from before the dot-product rule (ItsNotRexed#1754). docs/fspx.md, "Translation status", has 17 and lists what stops the other 12; the paragraph now points there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: SHADER-303. It is the agreed split of SHADER-300 with @Taffyyy-ops (proposal, answer): this PR has
v_dot4_i32_i8andv_dot4c_i32_i8, #1808 the other dot products andv_pk_fmac_f16.What and why
The FSPX programs of the upscaler DLL (#1661,
docs/fspx.md) use two signed-byte dot products 27,271 times, all in 13 of the 29 programs, and the translator had neither. Ten programs stopped there first.The rule
v_dot4_i32_i8 D, S0, S1, S2(VOP3P): S2 plus the sum of the four products of the sign-extended bytes of S0 and S1, modulo 2^32.v_dot4c_i32_i8 D, S0, S1(VOP2): the same sum added to D.OpBitFieldSExtract,OpIMulandOpIAdd.How it was confirmed
tools/hw_oracle.tests/semantic/test_alu_dot4_i8.py; the test runs the translated SPIR-V against them.Two modifiers, measured and refused
clamponv_dot4_i32_i80x7fffffff,0x80000000in the two overflowing sets)op_sel2,op_sel_hi5llvm-mcdoes not decodeUnsupported, not guessed: no listing carries them today.docs/fspx.md("What the hardware does with thatop_selwas not checked"). The doc now says so.Not in this PR
llvm-mcrejects them withgfx1030and withgfx1013plus the dot features, so translating them needs a decoder step first; 2 programs stop there.Tested
tools/fspx_unpack.py --disasmandtools/rdna2spirv.pyon my own copy of version 1.0.2.1, Linux,llvm-mc23.1.5.main(89b047c)spirv-val-validWhat the other 12 stop at first, with this PR:
s_buffer_load_dwordx8/x16into a register range that ends invcc_lo, vcc_hillvm-mcdoes not decode (theop_selform above)v_pk_add_u16, high half of a constantimage_atomic_addsrc_sccv_pk_fmac_f16vk_pipeline_checkon the translated programs (shader modules and compute pipelines):main: 13 programsllvm-mccannot decode there), so their translation does not reach the new case.compileall; 179 standard-library test files, none failed;pytest tests --ignore=tests/semantic: 4,208 passed, 54 skipped;unittest discover -s tests/semantic: 1,457 tests OK; viewer tests: 35 pass.Checklist
docs/design.md, with how it was confirmed ("Signed-byte dot products").AI-assisted (Claude Code, Claude Fable 5.2).