Repository navigation
GPU test cs_w32_movrels64: s_movrels_b64 - #4337
LouisRiverstone wants to merge 3 commits into
Conversation
ItsNotRexed#1598 merged s_movrels_b32/b64 with CPU-only checks, and ItsNotRexed#1850's fixture covers only the b32 form. Lane 0 checks the pair read at odd and even M0, M0 from v_readfirstlane (not foldable), the b32 form at a base register, a destination overlapping the source, and SCC kept. Registered in check.py, run_gpu_tests.py and regen_fixtures.py; tests/semantic/ test_movrels64_fixture.py runs it on the CPU against an SGPR-file model.
|
The fixture doesn't assemble with LLVM 23, and that takes the whole GPU suite down. Tested 797f240 on Windows 11, llvm-mc 23.1.6 (gfx1013). Line 33 of On GFX10 a 64-bit SGPR operand has to start at an even SGPR, as with any
To keep the overlap check, the base needs to be even with the overlap coming from M0. For example AI-assisted (Claude). |
|
Tested Confirmed the alignment error on Linux with LLVM 21.1.8 at I tested an aligned overlap that also detects an early write to the low destination register. With M0 = 1, use In a local fixture variant with those two expected words updated, AI-assisted (Codex). Synthetic shader only. AI-assisted verification. |
|
Windows + GPU check: NVIDIA GeForce RTX 5080 (driver 621.01) + AMD Radeon 610M iGPU (driver 32.0.13018.6), Windows 11, MSVC (VS BuildTools 18) + Ninja, RelWithDebInfo, llvm-mc 21.1.8 (gfx1013), spirv-as/spirv-val. Tested head Result: the new GPU fixture does not assemble on this toolchain - FAIL.
Suggested fix: the destination-overlapping-source case (fixture comment lines 6-7) should use an even-aligned pair, e.g. Synthetic fixtures only, no game files. AI-assisted (opencode); runs on my machine. |
|
PASS. The header derivation and expected words ( Coordination: #4331 and #4323 insert at the same anchors ( Approve. AI-assisted review, no game files, no GPU. |
|
Fails on two GPUs:
The semantic test passes because it reads Tested and written by Claude (Claude Code), posting from @theswiss24's account. |
|
Fixed in The overlap case is now
|
…:22]) llvm-mc 23 rejects the odd-based 64-bit SGPR pair s[21:22] (invalid register alignment), and one fixture it can't assemble stops the whole GPU run (MKmajster's finding, TEST-961). The overlap case is now s_movrels_b64 s[22:23], s[20:21] with M0 = 1: it reads s21, s22, which overlaps the destination s22, so W[1], W[2] only if the source is read first. The fixture test checks that every SGPR range starts at an even register.
|
Replying to @LouisRiverstone. Verified the submitted fix at AI-assisted (Codex). Synthetic fixture only. AI-assisted. |
|
The GPU run the author could not do. Tested head 922b5aa 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. |
|
Tested 922b5aa on AMD Radeon RX 6800 (RDNA2), AMD 26.8.1 (Windows 32.0.21045.5002), Windows 11 Pro 25H2 (build 26200), with llvm-mc 23.1.6 (conda-forge), since you had no LLVM 22+: pass.
The runtime programs came from AI-assisted (Claude Code). |
python -I on the file failed with ModuleNotFoundError: support, as the folder was not on sys.path (found by @justr4mzi on ItsNotRexed#4323, the same template). It is now inserted, as test_cs_shared_memory_limit does.
|
Thanks @tylerstraub. |
|
Follow-up at Automated test:
Same machine and setup as my earlier manual reports. AI-assisted (Claude Code). |
|
Tested Ran AI-assisted verification with synthetic inputs. |
#1598 merged
s_movrels_b32/s_movrels_b64with CPU-only checks, and #1850'scs_w32_pk_rel_extcovers only theb32form. This adds a GPU fixture,runtime/test/shaders/cs_w32_movrels64.asm.Setup: s20…s27 hold W[k] =
0x5EED0000 + 0x111·k, and lane 0 stores eight dwords:s_movrels_b64 s[10:11], s[20:21], M0 = 1 (an odd pair): W[1], W[2]0x5EED01110x5EED0222v_readfirstlane, which the translator can't fold: W[4], W[5]0x5EED04440x5EED0555s_movrels_b32 s12, s22, M0 = 3 fromv_readfirstlane: s250x5EED0555s_movrels_b64 s[21:22], s[21:22], M0 = 1: the destination overlaps the source, which is read first: W[2], W[3]0x5EED02220x5EED0333s_cmpbefore ans_movrelsand read after it (not written)1Registration: like the other wave32 fixtures, and not in the lane-mask list, so it also runs on llvmpipe.
Tests:
tests/semantic/test_movrels64_fixture.pyruns the fixture on the CPU against a model of the SGPR file. It also checks that both runners expect the same words and that two of the reads take a run-time M0. It passes 4/4,regen_fixtures.py --checkis clean, andtests/test_shader_checks.pyandtests/test_run_gpu_tests.pypass.Not run on a GPU by me: CI's llvmpipe job will run it. No game files. Claimed on #4257 before starting.
AI-assisted (Claude Code): I reviewed and ran the change and the tests.