Repository navigation
GPU tests: v_cvt_f16_i16/u16, v_cvt_i16/u16_f16, v_cvt_f32_ubyte0..3, v_cvt_f32_f64 (EGEN-GPU-CVT16) - #2291
GPU tests: v_cvt_f16_i16/u16, v_cvt_i16/u16_f16, v_cvt_f32_ubyte0..3, v_cvt_f32_f64 (EGEN-GPU-CVT16)#2291Vonsek wants to merge 7 commits into
Conversation
…and v_cvt_f32_f64 cs_cvt16 dumps 24 words: i16/u16 to f16 ties to even and sign extension, f16 to i16/u16 truncation, saturation and NaN, the kept destination high half, and the four ubyte selections. ps_cvt_f32_f64 checks f64 to f32 round to nearest even and overflow to infinity. Expected words are derived by hand in the .asm headers; semantic fixtures and tests added, and the two docs/design.md rows name the tests. AI-assisted.
Conflicts: docs/design.md runtime/test/shaders/check.py scripts/run_gpu_tests.py tests/semantic/regen_fixtures.py AI-assisted.
|
Merged main (62b7576) again; CPU checks and the PR's GPU tests pass on Radeon RDNA2 iGPU. AI-assisted. |
|
Tested Independent synthetic Vulkan check of
AI-assisted verification. |
|
Tested 62b7576 on Windows 11 build 26200.9974, NVIDIA RTX 5060 Ti / driver 621.24 (Vulkan 1.4.357), MSVC 19.44.35207, llvm-mc 21.1.8 (scripts/build_llvm_mc.ps1), SPIRV-Tools v2026.4, CMake 4.5.1 + Ninja 1.13.2. No game files.
This is a Blackwell / 32-wide-subgroup data point; the PR already reports RTX 5080 and an RDNA2 iGPU. Ran with an AI agent on my machine. |
|
Tested 62b7576 on AMD Radeon RX 9060 XT (RDNA4), AMD driver 26.10.44 (LLPC, Vulkan driver 2.0.395), Windows 11 Pro 10.0.26300, subgroup 32..64: pass. The check above is NVIDIA on Linux; this one is AMD on Windows, with native 64-wide subgroups.
Test programs: an MSVC 14.44 build of 4947579, this PR's base; the PR changes no C++ or CMake. llvm-mc 21.1.8 (native), Vulkan SDK 1.4.363.0. No negative control run here. No game files. AI-assisted (Claude Code). |
|
Tested Runtime and test programs built from this head (MSVC 14.51, Ninja, RelWithDebInfo), native Windows
This PR's shaders:
First RDNA4 run here, after the RTX 5080 and the RDNA2 iGPU in the description. AI-assisted (Claude Code); I checked the results. |
docs/design.md runtime/test/shaders/check.py scripts/run_gpu_tests.py tests/semantic/test_value_semantics.py tests/test_shader_checks.py AI-assisted.
…he merge of main (ItsNotRexed#2291) AI-assisted.
docs/design.md tests/test_shader_checks.py AI-assisted.
scripts/run_gpu_tests.py tests/semantic/regen_fixtures.py tests/semantic/test_value_semantics.py tests/test_shader_checks.py AI-assisted.
|
Tested
No game files. AI-assisted (Claude Code). |
|
Tested 014eff9 (merge base 7b7d73f) on NVIDIA GeForce RTX 5080, Linux 580.65.06: pass Tested the PR head merged with current main
Line-by-line against my main run (results that differ from main):
Not run: the full AI-assisted (Claude Code). |
|
Tested
AI-assisted (Claude Code). Synthetic shaders only, no game files. |
docs/design.md AI-assisted.
Requested by Lucas · project thread
Claimed in the coordination issue as: EGEN-GPU-CVT16 (claim comment)
What and why
v_cvt_f16_i16,v_cvt_f16_u16,v_cvt_i16_f16,v_cvt_u16_f16,v_cvt_f32_ubyte0..3andv_cvt_f32_f64were checked on the CPU or by hardware probes only. This adds GPU tests and semantic fixtures for them. Translator and rules are unchanged.cs_cvt16(compute dump, 24 words): i16/u16 to f16 ties to even (2049 to 2048, 2051 to 2052), sign extension (-2049, -32767), u16 65535 to +inf; f16 to i16/u16 truncation toward zero, saturation at both ends, +inf, NaN to 0; each 16-bit result keeps the destination's0xaaaahigh half and each source has junk in its high half;v_cvt_f32_ubyte0..3of0x89abcdef(all bytes >= 128). A compute dump rather than a pixel test, so NaN-adjacent words are not exposed to the RGBA32F export.ps_cvt_f32_f64(pixel test, needsshaderFloat64): f64 to f32 tie down, just above a tie, tie up, and -2^200 to -inf..asmheader.tests/semantic/test_value_semantics.pychecks them against a plain-Python reference (structbinary16/binary32) and runscs_cvt16in the interpreter; the interpreter has no f64, sops_cvt_f32_f64is only translated and checked for fourOpFConverts plus its reference words.v_cvt_flr/rpi(done), andmul:2onv_cvt_f32_ubyte0(ps_f32_cvt_mul2: GPU and CPU fixture for mul:2 on the integer and f16 conversions (TEST-298) #2006).docs/design.md: the two existing rows now name these tests.Tested
scripts/run_gpu_tests.py --filter cvt:cs_cvt1664/64 dumped words exact,ps_cvt_f32_f644096/4096 pixels exact, on NVIDIA GeForce RTX 5080 (driver 616.92) and on the AMD Radeon RDNA2 iGPU (driver 26.10.1, wave64), Windows 11.word 21: expected 0x434d0000, got 0x432b0000; zero-extending the i16 inv_cvt_f16_i16givesword 2: expected 0xaaaae800, got 0xaaaa7bc0.python -m unittest discover -s tests/semantic,python tests/semantic/regen_fixtures.py --check,python -I tests/test_shader_checks.py: OK.AI-assisted.
Checklist
docs/design.md, with how it was confirmed. (No new rule; the existing rows now cite the GPU tests.)