Repository navigation
Conversation
The low 32 bits of the signed product, the same word as v_mul_lo_u32. The opcode exists on gfx1010-gfx1013 (the console) and not on gfx103x, so it was never measured on the gfx1036 oracle; it raised Unsupported. GPU fixture cs_w32_mul_lo_i32, semantic test MulLoI32, design.md row. AI-assisted.
|
Tested e9c5828 on NVIDIA GeForce RTX 3090 (Ampere, subgroup 32..32), driver 610.88 (Vulkan 1.4.341), Windows 11 Pro 26300: pass. The PR's diff applied cleanly to
|
|
Tested
No game files. AI-assisted (Claude Code). |
runtime/test/shaders/check.py scripts/run_gpu_tests.py tools/rdna2spirv.py AI-assisted.
|
Tested 95ab2b1 merged onto main aa2988c 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). |
|
Verified on the merged tree: the two new MulLoI32 tests run and pass (value_semantics 41 passed / 283 subtests), and all eight expected words were independently recomputed correctly, including the inline-constant case (2^32-2^17+1)*(2^16+1) = -65535 — the shared OpIMul with v_mul_lo_u32 is sound since the low dword is sign-agnostic. test_shader_checks 75, run_gpu_tests 40 and rdna2spirv_decode 24 are green, the contract row is in design.md, and the fixture is regen_fixtures.py output from the hand-written asm with derivations in its header. The build.py -mcpu=gfx1013 pin makes the listing assemble even though LLVM dropped the opcode for gfx103x — consistent. GPU execution itself unverifiable on this host; not superseded (main has no v_mul_lo_i32). AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
docs/design.md AI-assisted.
|
Apple M2 / MoltenVK validation of head
No code changes, no game data; synthetic fixture and counts only. AI-assisted. |
|
Tested Environment: test programs rebuilt from this PR head with clang++ 23.1.5 (MSYS2 UCRT64), CMake 4.5.1, Ninja 1.13.2, Vulkan SDK 1.4.357.0 headers and SPIRV-Tools v2026.3; llvm-mc 23.1.5 (MSYS2 UCRT64); Python 3.13.5. Device reports subgroup 32..64.
This adds a native RDNA1 data point for an instruction that only exists on GFX10.1 (gfx1010–gfx1013); the earlier checks on this PR were RADV RDNA2, NVIDIA and CPU. Only the repository's synthetic fixtures were used. No game copy, executable, key, extracted shader, asset or log quoting game data was involved. AI-assisted: an AI agent set up the toolchain, built the test programs and ran the suites; the counts were checked before posting. |
|
Tested
New in this PR:
Every other test has the same result as on |
Requested by Lucas · project thread
Claimed in the coordination issue as: EGEN-VMUL-LO-I32, #3381 (comment)
What and why
v_mul_lo_i32(VOP3 opcode 0x16b) raisedUnsupported. It exists only on GFX10.1 (gfx1010-gfx1013), which includes the console's gfx1013. LLVM's gfx103x tables drop it, so the gfx1036 hardware oracle has never seen it.I found it by disassembling every opcode of every GFX10 encoding with LLVM 21
llvm-mcfor-mcpu=gfx1013and forgfx1030/gfx1036, then comparing the two lists.The result is the low 32 bits of S0 × S1 as signed integers. In two's complement that is the same word as
v_mul_lo_u32, so it gets the sameOpIMul.New contract row in
docs/design.md.Tested
Windows 11, LLVM
llvm-mc(the runner assembles with-mcpu=gfx1013),VK_LOADER_LAYERS_DISABLE=~implicit~, one GPU at a time,python -I scripts/run_gpu_tests.py --filter cs_w32_mul_lo_i32:4294967281 2147483648 1 63 606937216 4294901761 2779096486 0runtime/test/shaders/cs_w32_mul_lo_i32.asm. It covers sign-mixed and wrapping products, INT_MIN × -1, and SGPR, literal and inline-constant operands. Each header derives its words by hand. It is registered incheck.py,run_gpu_tests.pyandregen_fixtures.py.MulLoI32intest_value_semantics.pychecks the words against a plain-Python reference.main,MulLoI32errors withUnsupported: v_mul_lo_i32.OpIAddinstead ofOpIMulforv_mul_lo_i32,MulLoI32fails and the Radeon run fails (4294967294 2147483647 ...). I then reverted it.python -m unittest discover -s tests/semantic,python tests/semantic/regen_fixtures.py --check(clean),python -I tests/test_shader_checks.py, andpytest tests/test_docs_design_rows.py tests/test_run_gpu_tests.py.AI-assisted.
Checklist
docs/design.md, with how it was confirmed.