Repository navigation
test_make_game_argparse: the shaders stage probes two GPUs the test does not mock - #2818
Conversation
… than the test mocks
test_custom_jobs_forwarded_to_shaders asserts fallbacks=() but neutralises only four of the six
runtime_gpu_* probes the shaders stage consults. The two it misses answer False on hardware
tools/vk_subgroup_info.py documents: denorm_flush_to_zero_f32 on NVIDIA Vulkan drivers (VK_FALSE)
and integer_dot_product on a Vulkan 1.2 device such as MoltenVK's. Where a probe answers False,
make_game.py sets the fallback flag unconditionally instead of going through
keep_recorded_fallback(), so the assertion fails with fallbacks=('--no-ftz32',).
Add the two missing patches, the same six-probe list tests/test_make_game_translator_flags.py
already uses.
|
Verified by OreoFR on macOS 27.2.1, Apple M5 (MoltenVK), Python 3.12, head This is the failure I'd been seeing on this Mac all night (noted on #2792 as pre-existing on main). MEASURED
READ IN CODE
AI-assisted: Claude Code |
|
Verified on Windows, and the control bites: the suite fails with
So the two What it fixes, in its own words: the shaders stage probes What I did not check: that those two functions are the only probes the stage can raise on. I ran the file, not the stage against several cards, and a third probe added later would put the dependence back. AI-assisted: yes - DeepSeek v4.1 (flash), both arms run on the machine above. Written with an AI assistant. |
KelboLive
left a comment
There was a problem hiding this comment.
Verified independently on Windows with an NVIDIA card (RTX 4070 Ti SUPER: denorm_flush_to_zero_f32=False, integer_dot_product=True, per_vertex_inputs=True), so this is the documented NVIDIA case and not an llvmpipe-only one.
origin/main PR head 872d2e753
python -I tests/test_make_game_argparse.py FAILED (1 of 38) ok (38/38)
tests/test_make_game_translator_flags.py ok (42/42) ok (42/42)
tests/test_make_game_preflight.py ok (110/110, 1 skip) ok
python -m compileall -q make_game.py tests exit 0 exit 0
The main failure is the quoted one: fallbacks=() expected, ('--no-ftz32',) seen (test_custom_jobs_forwarded_to_shaders, line 372). Reproduced on the d920d850d base and again on current origin/main 86c30fcea (the three commits since do not touch the relevant files); git merge-tree against current main is clean.
The claim holds and no coverage is dropped: the six patches match the probe list test_make_game_translator_flags.py already uses (212-217), and the test still pins the exact preflight and shaders kwargs, fallbacks=() included. Both fallback paths stay covered in that file (run_main(integer_dot=False), and test_failed_ftz32_probe_keeps_the_recorded_choice). It is also the only test that asserted a literal fallbacks=(...) for a real main() run — the neighbouring one uses ANY — so nothing else has the same latent failure.
Two nits, both non-blocking:
- A one-line comment above the six patches saying why they are pinned (an NVIDIA driver answers
Falsefor denorm FTZ andmain()then adds--no-ftz32) would match the TEST-461 note above the neighbouring test. - Patching
make_game.runtime_gpu_infoonce, the waytest_make_game_wave64.pydoes, would keep a future probe from reopening the same gap the way themesh_shaderprobe did here.
Verification — VERIFY-2818Verdict: PASS (with stated limit)
AI-assisted: yes (Muse Wonder, Muse by Meta) |
Measurement: with this pull request merged, every standalone test file in the repository passes
The pass lists differ by exactly one line: and the skip lists are identical, so nothing was traded away to make room for it. The merge itself is the one file, +3/−1, on top of The one failure on
Scope of that claimThe runner executes every So this is "every standalone test file", not the whole test suite: the 33 skipped are the pytest-based files and the ones with no Environment: Linux, Python 3.15, llvmpipe — the CI-shaped blind spot this pull request is about. AI-assisted: yes — MiMo-V2.6-Flash (OpenCode). It built both trees, ran the two passes, diffed the lists and drafted this report. |
|
Verified on Windows. The control here is how often the test reaches the real GPU, not whether it passes.
So this is not a fix of a failing test - it is a fix of a test that depends on the machine it runs on. Here is the measurement, with Why the two calls matter: What I could not test: nothing else - the change is in the test file only. I did not translate a corpus or run the shaders stage for real; I ran the test file and measured which functions it reaches. AI-assisted: yes - DeepSeek v4.1 (flash), both arms on the machine above. Written with an AI assistant. |
|
Verified by MoonEyes (another person than the author) on head AI-assisted (Claude Code). |
|
Merging. Head AI-assisted (Claude Code). |
Claimed in the coordination issue as: TEST-ARGPARSE-GPU-PROBE-LIST
Depends on: #1885
What and why
JobsHandlingTest.test_custom_jobs_forwarded_to_shadersassertsfallbacks=(), but it mocks only four of the sixruntime_gpu_*probes the shaders stage consults. The two it leaves out are precisely the two that answerFalseon hardwaretools/vk_subgroup_info.py:50-55documents:denorm_flush_to_zero_f32— "where it is false (e.g. NVIDIA Vulkan drivers, which report VK_FALSE)"integer_dot_product— "false only on a Vulkan 1.2 device such as MoltenVK's"When a probe answers
False,make_game.pysets the fallback flag unconditionally rather than going throughkeep_recorded_fallback()(that path is only taken forNone), so the assertion sees a fallback the test never asked for:tests/test_make_game_translator_flags.py:212-217already mocks all six probes, so this is an incomplete copy of the same list rather than a deliberate difference. This change adds the two missing patches; nothing outside thewithblock changes.Depends on: #1885— that pull request insertsruntime_gpu_mesh_shaderinto the samewithheader, so the two conflict on one line. Whichever lands second rebases trivially; I did not reorder the existing probes to dodge it.Tested
No game files or particular hardware needed.
Before/after were measured on the same commit by stashing the change, so the single failure is attributable to the missing mocks.
runtime_gpu_*answers on the machine used (Mesa llvmpipe, LLVM 23.1.0, CPU Vulkan):per_vertex_inputs=False,barycentric_fallback=False,max_push_constants_size=256,mesh_draws_crash=False,integer_dot_product=True,denorm_flush_to_zero_f32=False. Only the last one produced the failure here;integer_dot_productis mocked too because the documented Vulkan 1.2 case would fail the same way.GPUs tested: n/a — no GPU tests. The reproduction runs against a CPU Vulkan device (Mesa llvmpipe) on Fedora Linux under a VM; no hardware GPU, vendor driver or OS driver was involved.
AI-assisted: yes — MiMo-V2.6-Flash (OpenCode), which located the failure, read
make_game.pyandtools/vk_subgroup_info.pyto establish the trigger conditions, and wrote the patch. The claim and this description were drafted by it as well.Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. — n/a, no translator rule in this change.