Repository navigation
GPU test cs_w32_lds_add_f32: ds_add_f32 and ds_add_rtn_f32 - #4323
LouisRiverstone wants to merge 2 commits into
Conversation
ItsNotRexed#3120 merged ds_add_f32 with CPU-only checks. Lane 0 of a wave32 group checks the returned old value, a plain sum, ties to even both ways, -0 + +0, overflow to +inf, the non-returning form and offset:. No denormal or NaN input (not measured). Registered in check.py, run_gpu_tests.py and regen_fixtures.py; tests/semantic/test_lds_add_f32_fixture.py runs it on the CPU against a once-rounded double sum and checks both runners expect the same words.
|
The official
This covers the single-active-lane cases for returned and stored values, both ties to even, signed zero, overflow and the immediate offset. Windows 11 build 26200, NVIDIA driver 617.14, subgroup size 32, CPython 3.14.10, LLVM 23.1.5, SPIRV-Tools v2026.4. The compute harness was built at |
|
Tested GPU & suite results
Minor finding in
|
|
Also tested |
|
PASS. The values are right: 1.5/2.25/3.75, both 2^24 ties ( Nit: Coordination: it conflicts with #4337/#4331 at the same anchors, so rebase after the first lands. Approve. AI-assisted review, no game files, no GPU. |
…ct for these inputs only @justr4mzi: python -I on the file failed with ModuleNotFoundError: support, as the folder was not on sys.path (now inserted, as test_cs_shared_memory_limit does). @tupacfan04: a double sum of two binary32 values is not exact in general; the docstring says it is for this file's inputs.
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.
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.
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.
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.
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.
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.
python -I on the file failed with ModuleNotFoundError: support, as the folder was not on sys.path (@Yourrespawn noted it on this PR, @justr4mzi on ItsNotRexed#4323). It is now inserted, as test_cs_shared_memory_limit does.
|
Thanks @justr4mzi and @tupacfan04, both fixed in
On the conflicts with #4331/#4337 at the same registration lines: whichever lands first, I'll rebase the others. |
|
Tested
|
|
Tested
Full GPU suite at this head
The base CPU test: This PR changes no C++, so I did not rebuild: the test programs are an MSVC 14.44 build of Tools: llvm-mc 23.1.6 (conda-forge), Vulkan SDK 1.4.363.0, Python 3.11.9, AI-assisted. Synthetic test programs and counts only, no game files. Created with Perplexity |
Kam471
left a comment
There was a problem hiding this comment.
Built the runner and ran at 654c07e67 on Windows 11, RTX 5070 Ti: run_gpu_tests.py --filter lds_add_f32 -> 1/1 passed, cs_w32_lds_add_f32 -> 1069547520 1081081856 1266679808 1266679810 0 2139095040 1048576000 1075838976; translator 1/1 + spirv-val; tests/semantic/test_lds_add_f32_fixture.py -> 4 tests, OK.
ds_add_f32 and ds_add_rtn_f32 now have a GPU fixture matching the expected words, and the fixture runs under python -I. No blocking issue.
#3120 merged
ds_add_f32/ds_add_rtn_f32with CPU-only checks. This adds a GPU fixture,runtime/test/shaders/cs_w32_lds_add_f32.asm. Lane 0 of a wave32 group stores eight dwords:ds_add_rtn_f32old value (LDS 1.5, DATA 2.25)0x3FC000000x407000000x4B8000000x4B8000020x000000000x7F800000ds_add_f32(no return): 1.0 + −0.750x3E800000ds_add_rtn_f32 … offset:4from base 0xC0 (2.0 + 0.5)0x40200000docs/design.mdrow says.WAVE32_DUMPS/CS_DUMPS(check.py), the compute list, the expected words and the wave64-exclusion tuple (run_gpu_tests.py), andregen_fixtures.py. It's not in the lane-mask list, so it also runs on llvmpipe.Tests:
tests/semantic/test_lds_add_f32_fixture.pyruns the fixture on the CPU and checks the eight words. Its reference adds in double precision, which is exact for two binary32 values, and rounds once. It also checks that both runners expect the same words and that EXEC is cut before the LDS ops. 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 assemble and run it, and hardware runs are welcome. No game files. Claimed on #4257 before starting.
AI-assisted (Claude Code): I reviewed and ran the change and the tests.