Repository navigation
GPU test cs_w32_fmamk_f16: v_fmamk_f16 and v_fmaak_f16 on a GPU - #4491
kingzzim7-create wants to merge 2 commits into
Conversation
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 7d3b24bb on Windows 11:
tests/semantic/test_valu_fmamk_fmaak_f16.py-> 4 tests, OK.- Built
vk_compute_test/vk_store_test/vk_harness, thenrun_gpu_tests.py --filter fmamk-> 1/1 passed:cs_w32_fmamk_f16returned3735897856 3203352192 15363 15363 12902 17408 18176 31744; translator 1/1spirv-val. git diff --checkclean.
The new GPU fixture pins v_fmamk_f16/v_fmaak_f16 against real hardware. No blocking issue.
|
Apple M2 data point for the new f16 FMA-mask fixture. Tested head 7d3b24b on Apple M2 (Mac14,3), macOS 26.4, MoltenVK 1.4.2 (direct), subgroup 4..32, llvm-mc 23.1.6, clean full build on AppleClang 17.
AI-assisted. |
|
Thanks @Kam471 for reproducing it, glad the words match on a second machine. |
whattheflop
left a comment
There was a problem hiding this comment.
Tested 7d3b24bb on Radeon iGPU (9800X3D), AMD 25.10.30.02, Windows 11. The stock fixture matched 8/8 words at native subgroup 32 with zero validation diagnostics. Both flag settings produced the same native module. Radeon verification in #166. AI-assisted.
|
Thanks @bobcatchris s, good to see the same words on the M2. Since you measured this row on gfx1100 in #4141: do any of your measured words cover these cases (the 0x3C01 * 0x3C01 + 0x1000 single-rounding case or the +inf overflow)? If they match, I can add a note to the row that the fixture's words agree with the gfx1100 measurement. |
|
Thanks @whattheflop, an AMD result on the same words is great to have. |
|
Automated test:
Same machine and setup as my earlier manual reports. AI-assisted (Claude Code). |
|
Tested
No game files. Tested and written by Claude (Claude Code), posting from @theswiss24's account. |
|
Tested 7d3b24b on AMD Radeon RX 9070 XT (RADV GFX1201) and the Ryzen 7 9800X3D iGPU (RADV RAPHAEL_MENDOCINO, gfx1036), Mesa 26.2.6, Linux 7.3.4: pass, no regressions.
No game files. AI-assisted. |
|
Tested 7d3b24b merged with main 03b09a0 (merge is the PR head, nothing to merge) on Windows 11 with two GPUs (MSVC 14.51): built vk_compute_test, vk_store_test and vk_harness; Negative control: the PR changes no translator or runtime file, so there is nothing to restore from main. Changing the expected first word to |
|
Tested
No game data. AI-assisted. |
|
Update: @Flyander pointed out on #4543 that every lane storing to the same offsets is a data race under the Vulkan memory model. This fixture had the same pattern, so the new commit adds AI-assisted (Claude). |
whattheflop
left a comment
There was a problem hiding this comment.
Retested corrected head 2d6b74ed on Windows Radeon iGPU (AMD 25.10.30.02), native subgroup 32. After confirming the lane-zero store guard and Vulkan 1.2 SPIR-V validation, the stock harness matched 8/8 words with zero Khronos validation diagnostics. This supersedes my earlier Radeon report at 7d3b24b, where all lanes wrote the same locations. Details in #166. AI-assisted.
|
Tested 2d6b74e merged onto main d0835dd on an RTX 5090 (driver 616.92), Windows 11, Vulkan SDK 1.4.363. The GPU test programs were built from the same tree:
AI-assisted (Claude Code). |
|
@JRamos1993 Thanks for testing on the 5090! |
Claimed in the coordination issue as: new TEST item, first GPU fixture for v_fmamk_f16 / v_fmaak_f16 (claim in #4421)
What and why
The docs/design.md row for
v_fmamk_f16/v_fmaak_f16(translator support from #1989) was CPU-checked only. This adds a wave32 compute fixture,runtime/test/shaders/cs_w32_fmamk_f16.asm, registered incheck.pyandscripts/run_gpu_tests.pylikecs_w32_new_ops. Eight words, derived in the file header from the ISA rule (fmamk: D = S0 * K + S1,fmaak: D = S0 * S1 + K, one rounding to f16, the high half of D kept):fmaakwith a negative operand (3 * -2 + 10 = 4.0; S0 * K + S1 would give 28.0)The docs row gets a GPU-checked sentence (NVIDIA only; not measured on AMD hardware, so the Not GPU-verified marker stays, as in the
cs_buf_load_subandcs_w32_new_opsrows). #4141 measures this row on gfx1100; its words can be cross-checked against these.Tested
NVIDIA GeForce RTX 4060 Ti, driver 621.01, Windows 11, MSVC 14.52 (Visual Studio 2026), llvm-mc 23.1.6, Vulkan SDK 1.4.350.0, at 03b09a0:
python -I scripts/run_gpu_tests.py --filter cs_w32_fmamk_f16: 1 translated, 1 pass spirv-val; PASS3735897856 3203352192 15363 15363 12902 17408 18176 31744LEONIDA_W64_EMULATE=1: PASS, the same wordsvk_compute_test cs_w32_fmamk_f16.spv 1 dump: 0 mismatches, the same wordspython -m unittest tests.test_shader_checks: 79 tests OKChecklist
docs/design.md, with how it was confirmed. (Not applicable: a test for an existing rule; the row gets its GPU result.)AI-assisted: yes (Claude).