Repository navigation
GPU runners: drop only DenormPreserve 16 where the device lacks it - #4988
bobcatchris wants to merge 1 commit into
Conversation
|
Independent check of Environment: Windows 11, CPython 3.15.2 (+ pytest venv for the pytest file), CPU only. Synthetic inputs, no game files, no GPU.
The change is correctly scoped: drop Not run: actual GPU fixtures (needs runtime build + assembled SPIR-V) — deferred to keep this check light. AI-assisted (Devin). |
|
At Run this from the repository root with import os, sys
from pathlib import Path
sys.path.insert(0, str(Path("tests").resolve()))
from test_make_game_translator_flags import MainWiringTest
case = MainWiringTest()
try:
for override, prop in (("1", True), ("0", False)):
os.environ["LEONIDA_DENORM_PRESERVE_FALLBACK"] = override
print(override, prop, case.run_main(denorm_preserve=prop))
finally:
case.doCleanups()With override 1 and property true, neither stage receives On Windows 11, the live device probe reports both float-control properties as true on the RTX 4090 and AMD Radeon iGPU. The 50 subgroup-info tests, 43 GPU-runner tests, and 28 translator-flag tests pass. The reproduction uses synthetic inputs and does not render a frame. AI-assisted. |
|
Follow-up to the semantic-suite line in the PR body, now that the comparison run on main finished: both this head and current main AI-assisted. |
|
Tested b3be3f4 on AMD Radeon 610M (RADV RAPHAEL_MENDOCINO, Mesa 26.2.6), CachyOS Linux, LEONIDA_VK_DEVICE=RADV: pass.
This device reports the property true, so the automatic fallback branch is only exercised here through the env var. AI-assisted. |
|
Tested b3be3f4 on Intel UHD Graphics 630 (CFL GT2), Mesa 25.2.8 ANV, Ubuntu 24.04, LEONIDA_VK_DEVICE=Intel: no change.
AI-assisted. |
|
Tested Result: pass, with no change against
The pass/skip/fail list is identical test by test on both. This doesn't exercise the Tested and written by Claude (Claude Code), posting from @theswiss24's account. |
b3be3f4 to
0e46a76
Compare
|
Good catch — fixed at Your exact reproduction now prints:
Added a regression test ( AI-assisted. |
|
Tested At AI-assisted verification. |
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Reviewed at \�3be3f44. Tested on Windows 11 with AMD RDNA2 iGPU (gfx1036):
- \python -m unittest tests/test_make_game_argparse.py tests/test_make_game_translator_flags.py tests/test_run_gpu_tests.py tests/test_vk_subgroup_info.py\ -> 157 passed, OK (8.76s).
- Verified the 64-bit \VkPhysicalDeviceFloatControlsProperties\ C-struct offsets byte-for-byte (\sizeof == 88, \FC_SIGNED_ZERO_INF_NAN_F32 == 28, \FC_DENORM_PRESERVE_F16 == 36, structure type 1000197000) and pNext buffer lifetime retention in \ ools/vk_subgroup_info.py.
- Narrow fallback correctly drops \OpCapability DenormPreserve\ while keeping \SignedZeroInfNanPreserve 32.
- \git diff --check\ clean. No game files. AI-assisted review (Gemini).
|
Tested 0e46a76 on Tesla V100 (Volta) + RTX 4090 (Ada), Linux: pass Machines: Tesla V100-SXM2-32GB (Volta, 32-wide, NVIDIA 580.95.05, Ubuntu 24.04) and RTX 4090 (Ada, 32-wide, NVIDIA 570.153.02 user-space Vulkan driver in a Linux container, Vulkan 1.4.303). The 4090 has mesh shaders and fragment barycentrics, so it runs the mesh/barycentric tests the V100 skips. Each run is the PR diff applied to
Not covered here: a device that actually lacks AI-assisted (Claude Code). |
Kam471
left a comment
There was a problem hiding this comment.
Tested head 0e46a76
python -I -m pytest tests/test_make_game_argparse.py tests/test_make_game_translator_flags.py tests/test_run_gpu_tests.py tests/test_vk_subgroup_info.py -q->158 passed, 158 subtests passedpython -I -m pytest tests/test_translate.py -q->597 skipped, 0 run: llvm-mc is not installed on this host (LLVM_MC=None, found llvm-mc: None, spirv-as/val: True), sotest_no_denorm_preserve_keeps_signed_zerocould not execute herepython -I tools/vk_subgroup_info.pyon RTX 5070 Ti ->shader_signed_zero_inf_nan_preserve_float32: true,shader_denorm_preserve_float16: true- direct call of
runtime/test/shaders/build.py:denorm_preserve_fallback()->True/False/Falsefor override1/0/ unset git diff --check-> clean
Offsets match VkPhysicalDeviceFloatControlsProperties (size 88, fields 28 and 36). build.py probes once per translation batch, not per shader.
Verdict: no blocking findings; the translate-path test is unverified locally and needs a runner with llvm-mc (prior review at 3be3f44 predates this head).
|
Follow-up on the skipped translate test (head
|
|
Tested
|
|
Independent check of 0e46a76 on Apple M4 Pro, macOS 27.2.1, with MoltenVK 1.4.2 and KosmicKrisp 26.2.99. Both ICDs report FP16 denormal preservation unavailable and FP32 signed-zero, infinity, and NaN preservation available. On both ICDs, automatic selection and LEONIDA_DENORM_PRESERVE_FALLBACK=1 removed DenormPreserve 16 while retaining SignedZeroInfNanPreserve 32. Setting the override to 0 retained both. I verified the emitted SPIR-V and index.json from run_gpu_tests.py and build.py. cs_user_sgprs passed in all six driver/mode combinations, and 122 unit tests passed. This checks fallback selection and code generation. FP16 denormal arithmetic was outside the test. Synthetic fixture only. AI-assisted. |
0e46a76 to
cedb0ff
Compare
cedb0ff to
3352283
Compare
|
Independent native Windows check of 3352283d. RTX 3080 Ti, NVIDIA 621.35, LLVM MC 23.1.6, Vulkan SDK 1.4.363.0. With AI-assisted. |
3352283 to
6cafe69
Compare
|
I tested I ran the stock I replayed each compiled shader with Vulkan core and synchronization validation enabled. The parent produced The PR also passed AI-assisted verification using synthetic shaders. |
|
checked: #4988 @ 6cafe69 — CPU only, no GPU: |
|
Tested 6cafe69 merged with main 26ecd9f on Linux WSL2 (Python 3.12.16, -I): concern (merge conflict with main) |
All translated modules declare SignedZeroInfNanPreserve 32 and DenormPreserve 16, but these are separate device properties. MoltenVK and llvmpipe report shaderSignedZeroInfNanPreserveFloat32 true and shaderDenormPreserveFloat16 false, so the second capability makes every module invalid usage on those drivers; a validation run of the suite then fails 242 module creations. vk_subgroup_info.py now queries VkPhysicalDeviceFloatControlsProperties and reports both properties. run_gpu_tests.py, build.py and make_game.py select a narrow --no-denorm-preserve fallback where the second property is false, with LEONIDA_DENORM_PRESERVE_FALLBACK=1/0 as an override; --no-float-controls still drops both capabilities. Apple M2 end to end (MoltenVK 1.4.2): auto selection builds 242 modules with 0 DenormPreserve capabilities and 242 SignedZeroInfNanPreserve ones, the index lists only shaderSignedZeroInfNanPreserveFloat32, forcing the fallback off restores 242 DenormPreserve modules, and the GPU suite is 152/217 in both modes with the same seven known failures. Full non-semantic pytest 1622 passed, 26 skipped; semantic 6245 tests with only the known ARM64 failures. No game data; synthetic fixtures and counts only. AI-assisted.
6cafe69 to
2c03e02
Compare
|
Tested 6cafe69 on AMD Radeon RX 6800 (RDNA2 gfx1030, AMD 26.11.2, Windows 11): pass Trial merge onto
Toolchain: llvm-mingw 20261117 clang, CMake 4.5.1 + Ninja, |
|
Tested MSVC (VS 18) Vulkan test programs built from This device reports No game files. AI-assisted (Claude Code). |
|
I tested I built
For the default 1D array view, the explicit mip/layer subrange and the typed null view, I also compared the mapped bytes against the expected 64 ? 64 RGBA8 image. All three matched byte for byte in both builds. The tests used synthetic textures. AI-assisted. |
|
✅ Automated security review: CLEAN (commit
Scope: static analysis of added diff lines only; no code was executed. Please review findings manually. |
Implements the runner-side item from XFlawless1's post on #4933. The runtime and
vk_pipeline_checkside of RT-288 are untouched.Every translated module declares
SignedZeroInfNanPreserve 32andDenormPreserve 16, but those are separate device properties. On Apple M2 / MoltenVK 1.4.2 (macOS 26.4, subgroup 4..32, device Vulkan 1.4.357),vulkaninforeportsshaderSignedZeroInfNanPreserveFloat32 = trueandshaderDenormPreserveFloat16 = false; a validation run therefore rejects the DenormPreserve capability on every module while the signed-zero one is fine.tools/vk_subgroup_info.pynow queriesVkPhysicalDeviceFloatControlsPropertiesand reports both properties in its JSON (verified againstvulkaninfoon this box).tools/rdna2spirv.pygains--no-denorm-preserve, which drops only theDenormPreservecapability andDenormPreserve 16mode; the index then lists onlyshaderSignedZeroInfNanPreserveFloat32.--no-float-controlsstill drops both.run_gpu_tests.py,build.pyandmake_game.pyselect the new flag where the device reports the property false, withLEONIDA_DENORM_PRESERVE_FALLBACK=1/0as an override.Tested on Apple M2 / MoltenVK 1.4.2, llvm-mc 21.1.8, Python 3.13.18:
build.pywith auto selection: 242 modules, 0 declaringDenormPreserve, all 242 still declaringSignedZeroInfNanPreserve; index entries list onlyshaderSignedZeroInfNanPreserveFloat32. WithLEONIDA_DENORM_PRESERVE_FALLBACK=0: 242 modules declareDenormPreserve.compileallandgit diff --checkclean.No game data; synthetic fixtures and counts only.
AI-assisted.