Repository navigation
Conversation
|
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), AMD Windows driver 32.0.32029.2010, Windows 11, with #7293's diff applied on top of this PR's head (91368c3): All 8 words match One gap: AI-assisted (Claude Code). |
|
Tested 91368c3 with #7293 (
Synthetic fixture only, no game files. AI-assisted (Claude Code). |
tupacfan04
left a comment
There was a problem hiding this comment.
The fixture and expected words are consistent, and the build.py/check.py path is integrated, but the standard GPU runner cannot assemble or run it.
runtime/test/shaders/build.py:86-102addsasm_mcpu()and:173applies the fixture's; mcpu: gfx1030;check.py:205-210definesDOT4_NEGand:1786-1789runs it. The eight words, the plain-dot control, and theneg_lo/neg_hicases are consistent.scripts/run_gpu_tests.py:95-108assemble_to_s()still hardcodes-mcpu=gfx1013and only scans for; mattr:. It ignores; mcpu: gfx1030, sopython -I scripts/run_gpu_tests.py --filter cs_dot4_negfails in llvm-mc withv_dot4_i32_i8unsupported on gfx1013.- Even with assembly fixed,
run_gpu_tests.pydoes not import/registerDOT4_NEGfromcheck.py; there is no runnable case row, so the filter ends with no GPU test cases rather than executing the fixture. The auto-discovered.asmlist only builds the shader; expected-word dispatch is separate.
Fix: make assemble_to_s() honor ; mcpu: (or accept ; mattr: +dot1-insts for gfx1013), and import/register DOT4_NEG in the run_gpu_tests.py compute cases with the same eight expected words, so --filter cs_dot4_neg assembles as gfx1030 and runs. The mcpu header does not change the existing gfx1013 default. Synthetic only; no game files. AI-assisted (OpenCode).
|
Tested The fixture. The problem. The new
#7237 ( |
|
Fixed by rebuilding on #7237 as you suggested: the branch is now #7237's head plus one commit that adds only Re-checked the three readers you listed:
|
… fixture header (SHADER-1254) ItsNotRexed#7293 translates the neg_lo / neg_hi fields of v_dot4_i32_i8 to the rule measured on gfx1036, but only semantic tests and spirv-val covered it. cs_dot4_neg.asm runs the same program on a GPU: one thread, eight stores, the plain dot, neg_lo and neg_hi on S0 and S1, both, the addend's neg_lo, and a clamp that saturates. v_dot4_i32_i8 does not assemble for gfx1013, which every reader hardcoded, so a fixture can now name its target with a "; mcpu:" leading comment in all four places that assemble one: build.py, scripts/run_gpu_tests.py, tests/conftest.py and tests/test_rdna2_decode.py. The default stays gfx1013. The same header is in ItsNotRexed#7237 for global_atomic_csub; this is a duplicate of that mechanism, kept here so the fixture does not depend on an unmerged, conflicting branch. Depends on: ItsNotRexed#7293.
|
Rebased onto current Re-checked: |
|
Independent RDNA4 check on Linux (RADV, Navi 48), run on head Result: the Cause of the failure: the translator refuses The comment just above it says "A set bit is refused". The build log shows the same thing: Verified:
Not verified: whether the Environment: AMD Radeon RX 9070 XT (RADV GFX1201), Linux. Command: AI-assisted (Claude). Reviewed and posted by the author. |
|
Tested 8065ce5 with #7293 (
(The earlier head 91368c3 still crashed Synthetic test only, no game files. AI-assisted (Claude Code). |
|
@kett1m, the independent GPU runs on #8259 flagged that our fixtures cover much of the same signed-byte dot rule. Your clamp saturation check and #8259's combined addend-sign check each catch something distinct. Could we land one fixture with both checks and run it through both GPU runners? I suggest adding your clamp check to #8259 with credit. Its existing fixture runs through both runners using the |
|
AI-assisted comparison with #8259. CachyOS x86-64, CPython 3.14.10, LLVM 23.1.5, GeForce RTX 4080 / NVIDIA 620.70.06, 32-wide, validation on. Exact fixture heads
All ten modules passed I also ran |
|
Note for whoever merges: #8259 (SHADER-1258) adds a second fixture for the same instruction, opened shortly after this one. Its head does not touch |
|
Closing in favour of #8259. Raxstreams proposed one fixture with both checks, and their header ( |
Clamp case adapted from kett1m in ItsNotRexed#8239. Local candidate for fixture consolidation.
Claimed in the coordination issue as SHADER-1254.
Depends on: #7293, which translates the
neg_lo/neg_hifields; without it the translator refuses the instruction.What and why
#7293 pins the hardware rule with semantic tests and
spirv-valonly: on S0/S1neg_loflips bit 15 andneg_hibit 31, and on the addendneg_hiclears bit 31 beforeneg_loflips it. There was no GPU fixture for the instruction at all, so thegfx1036table stayed the only hardware evidence.cs_dot4_neg.asmis one thread and eight stores: the plain dot,neg_loandneg_hion S1, both on S1,neg_loandneg_hion S0, the addend'sneg_lo, and aclampthat saturates.check.pycompares the eight words (DOT4_NEG), and the.asmheader carries the derivation.v_dot4_i32_i8does not assemble forgfx1013, which every reader hardcoded, so a fixture can name its target with a; mcpu:leading comment in all four places that assemble one:build.py,scripts/run_gpu_tests.py,tests/conftest.pyandtests/test_rdna2_decode.py. The default staysgfx1013, so no existing fixture changes.This reworks the first head, which junaydirfan showed would have broken
run_gpu_tests.pyand two pytest cases by teaching onlybuild.pyabout the header. It also replaces the earlier attempt to stack on #7237, which has since gone conflicting: the header mechanism is duplicated here (the same idea,; mcpu:), so this PR stands onmainalone. Whichever of the two lands first, the other rebases.Tested
With #7293 applied, on
main47428cc2:build.py: 1 of 1 translated, 1 passspirv-val;check.pygivescs_dot4_neg okon an RTX 3090 (Linux, driver 620.70.06), without[0..7] = 00000040 ffffff40 00000240 00000140 fffffd40 00000440 7fffffff 80000040, matching the header's derivation.scripts/run_gpu_tests.py --filter cs_fma --build runtime/build/linux: the whole fixture set assembles (nollvm-mcfailure) and the selected case passes.python -m pytest tests/test_translate.py -k cs_dot4_neg: 2 passed.python -m pytest tests/test_rdna2_decode.py: 1 failed, 15 passed, exactly as onmainwithout this change (that failure iscs_w32_permlane_fi.asm'sop_sel, unrelated).Writing the derivation caught my own sign error in
out[5]: S1's fourth byte is -8, so negating S0's fourth byte from 4 to -124 makes that product positive, 988, not -996.AI-assisted: yes