build.py, check.py: take the f16 interpolation fallback from the device, as run_gpu_tests.py does; no false failures on MoltenVK (TEST-CHECK-F16-INTERP-AUTO) #2176

Closed
Tauwni wants to merge 4 commits from upstream-pr/2176 into main
Tauwni commented 2026-11-26 02:08:32 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-26T02:08:32Z.


Claimed in the coordination issue as: TEST-CHECK-F16-INTERP-AUTO (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7180496597)

What and why

scripts/run_gpu_tests.py turns on --f16-interp-fallback by itself where tools/vk_subgroup_info.py reports per_vertex_inputs: false (MoltenVK can't convert PerVertexKHR inputs to Metal). runtime/test/shaders/build.py and check.py took it only from LEONIDA_F16_INTERP_FALLBACK=1. So the standalone build.py + check.py run that docs/testing.md describes fails two fixtures on a Mac:

ps_ij_computed       vk_harness failed or returned no pixels
ps_interp_f16_high   vk_harness failed or returned no pixels

Both were translated with PerVertexKHR inputs that MoltenVK can't compile.

With this change, build.py and check.py ask the same question as run_gpu_tests.py. The variable still forces the answer either way, and now also takes 0. build.py caches the answer, as run_gpu_tests.py does. docs/testing.md is updated to match.

Tested

Apple M3, macOS 26.5.1. build.py + check.py on main with this change and the open fixes the run needs (#1444 so build.py gets past cs_dpp_cmp), test programs rebuilt:

before after
MoltenVK 1.4.2 ps_interp_f16_high, ps_ij_computed FAIL ps_interp_f16_high ok, ps_ij_computed SKIP
KosmicKrisp (Mesa 26.3.1) both SKIP (no VK_KHR_fragment_shader_barycentric) ps_interp_f16_high ok, ps_ij_computed SKIP
llvmpipe (Mesa 26.3.1) both SKIP ps_interp_f16_high ok, ps_ij_computed SKIP

These now match what run_gpu_tests.py reports on the same three drivers. No other fixture changes. tests/test_run_gpu_tests.py, tests/test_shader_checks.py and the docs tests are OK.

GPUs tested: Apple M3 (10-core GPU), MoltenVK 1.4.2 and KosmicKrisp (Mesa 26.3.1), macOS 26.5.1 (25F80); llvmpipe (Mesa 26.3.1)

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.

🤖 Generated with Claude Code

Red checks: from main, not this change

The failing jobs (check, macos-python, stdlib-tests-linux, linux-gpu-tools, macos, windows) fail the same way on main d48a957bb (MEASURED on macOS for the Python tests, 1 run, with the same assertion text; GPU tests READ from this PR's CI logs). The open pull requests that fix them:

Failing on main Fixed by
test_docs_cli_flags #2536
test_make_game_preflight, test_progress_dashboard (repository URL) #2550
test_docs_repo_paths #2552 (all 14 paths; it conflicts with main, a merge is on Tauwni:fix/2552-merge-main, correction)
test_tool_stdout_encoding #2531, plus two scripts on Tauwni:fix/stdout-replace-two-new-scripts (no PR, open PR limit)
test_windows_boot_journal_seed #2514
test_docs_python_deps passes with the fixes above merged
test_build_runtime_fallback #2573 (passes with it, macOS, 1 run)
vk_bindless_dimensions (macOS) #2441
test_docs_env_vars DOC-CLWB-SETTING (fix)
test_make_game_pipelines, test_sampler_source_census, test_spirv_metal_set0_cli_errors, test_spirv_metal_set0_extra, tests/semantic/test_valu_cvt_f16_int16_mods.py, ps_exp_f32_denorm_rt (macOS) branches on Tauwni/leonida, no PR (finding)
cs_imgatomic_ext (macOS, linux-gpu-tools) #1518, closed without a comment
vk_xdxr_postbuild_readback (Windows) already passes on main: merge main

Not checked by a second agent or human yet.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5502689104 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2176). Originally posted by [Tauwni](https://github.com/Tauwni) on 2026-11-26T02:08:32Z. --- Claimed in the coordination issue as: TEST-CHECK-F16-INTERP-AUTO (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7180496597) ### What and why `scripts/run_gpu_tests.py` turns on `--f16-interp-fallback` by itself where `tools/vk_subgroup_info.py` reports `per_vertex_inputs: false` (MoltenVK can't convert `PerVertexKHR` inputs to Metal). `runtime/test/shaders/build.py` and `check.py` took it only from `LEONIDA_F16_INTERP_FALLBACK=1`. So the standalone `build.py` + `check.py` run that `docs/testing.md` describes fails two fixtures on a Mac: ``` ps_ij_computed vk_harness failed or returned no pixels ps_interp_f16_high vk_harness failed or returned no pixels ``` Both were translated with `PerVertexKHR` inputs that MoltenVK can't compile. With this change, `build.py` and `check.py` ask the same question as `run_gpu_tests.py`. The variable still forces the answer either way, and now also takes `0`. `build.py` caches the answer, as `run_gpu_tests.py` does. `docs/testing.md` is updated to match. ### Tested Apple M3, macOS 26.5.1. `build.py` + `check.py` on `main` with this change and the open fixes the run needs (#1444 so `build.py` gets past `cs_dpp_cmp`), test programs rebuilt: | | before | after | |---|---|---| | MoltenVK 1.4.2 | `ps_interp_f16_high`, `ps_ij_computed` FAIL | `ps_interp_f16_high` ok, `ps_ij_computed` SKIP | | KosmicKrisp (Mesa 26.3.1) | both SKIP (no `VK_KHR_fragment_shader_barycentric`) | `ps_interp_f16_high` ok, `ps_ij_computed` SKIP | | llvmpipe (Mesa 26.3.1) | both SKIP | `ps_interp_f16_high` ok, `ps_ij_computed` SKIP | These now match what `run_gpu_tests.py` reports on the same three drivers. No other fixture changes. `tests/test_run_gpu_tests.py`, `tests/test_shader_checks.py` and the docs tests are OK. GPUs tested: Apple M3 (10-core GPU), MoltenVK 1.4.2 and KosmicKrisp (Mesa 26.3.1), macOS 26.5.1 (25F80); llvmpipe (Mesa 26.3.1) AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ### Red checks: from `main`, not this change The failing jobs (`check`, `macos-python`, `stdlib-tests-linux`, `linux-gpu-tools`, `macos`, `windows`) fail the same way on `main` `d48a957bb` (MEASURED on macOS for the Python tests, 1 run, with the same assertion text; GPU tests READ from this PR's CI logs). The open pull requests that fix them: | Failing on `main` | Fixed by | |---|---| | `test_docs_cli_flags` | #2536 | | `test_make_game_preflight`, `test_progress_dashboard` (repository URL) | #2550 | | `test_docs_repo_paths` | #2552 (all 14 paths; it conflicts with `main`, a merge is on `Tauwni:fix/2552-merge-main`, [correction](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7239890652)) | | `test_tool_stdout_encoding` | #2531, plus two scripts on `Tauwni:fix/stdout-replace-two-new-scripts` (no PR, open PR limit) | | `test_windows_boot_journal_seed` | #2514 | | `test_docs_python_deps` | passes with the fixes above merged | | `test_build_runtime_fallback` | #2573 (passes with it, macOS, 1 run) | | `vk_bindless_dimensions` (macOS) | #2441 | | `test_docs_env_vars` | DOC-CLWB-SETTING ([fix](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7238921436)) | | `test_make_game_pipelines`, `test_sampler_source_census`, `test_spirv_metal_set0_cli_errors`, `test_spirv_metal_set0_extra`, `tests/semantic/test_valu_cvt_f16_int16_mods.py`, `ps_exp_f32_denorm_rt` (macOS) | branches on `Tauwni/leonida`, no PR ([finding](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7239812627)) | | `cs_imgatomic_ext` (macOS, linux-gpu-tools) | #1518, closed without a comment | | `vk_xdxr_postbuild_readback` (Windows) | already passes on `main`: merge `main` | Not checked by a second agent or human yet.
real-rusher commented 2026-11-26 10:20:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by real-rusher on 2026-11-26T10:20:21Z.


Partly verified on main a73a57e1 with Mesa llvmpipe (Mesa 25.2.8, LLVM 20.1.2, Ubuntu 24.04 x86-64, no GPU), llvm-mc 21.1.8, LEONIDA_F16_INTERP_FALLBACK unset. Merges cleanly into main.

  • Standalone build.py + check.py, which this PR changes: on both trees build.py stops at cs_dpp_cmp.asm ("dpp variant of this instruction is not supported"), the failure #1444 fixes. Before it stops, with this PR it prints "not built (computed I/J pairs need PerVertexKHR inputs, off under the fallback): ps_ij_computed", and check.py reports ps_ij_computed as SKIP with that reason instead of main's "missing ps_ij_computed.spv".
  • Not confirmed here: ps_interp_f16_high (build.py stops before it), and the MoltenVK case itself. llvmpipe has no VK_KHR_fragment_shader_barycentric, so even a complete build skips both shaders there for that reason (checked with #1444 alone: 117 of 234 pass, both SKIP).

Note for review: it conflicts with #1444 in runtime/test/shaders/build.py, so whichever lands later needs a rebase, and a full standalone run needs both.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7189232483 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2176#issuecomment-7189232483). Originally posted by [real-rusher](https://github.com/real-rusher) on 2026-11-26T10:20:21Z. --- Partly verified on main a73a57e1 with Mesa llvmpipe (Mesa 25.2.8, LLVM 20.1.2, Ubuntu 24.04 x86-64, no GPU), llvm-mc 21.1.8, LEONIDA_F16_INTERP_FALLBACK unset. Merges cleanly into main. - Standalone build.py + check.py, which this PR changes: on both trees build.py stops at cs_dpp_cmp.asm ("dpp variant of this instruction is not supported"), the failure #1444 fixes. Before it stops, with this PR it prints "not built (computed I/J pairs need PerVertexKHR inputs, off under the fallback): ps_ij_computed", and check.py reports ps_ij_computed as SKIP with that reason instead of main's "missing ps_ij_computed.spv". - Not confirmed here: ps_interp_f16_high (build.py stops before it), and the MoltenVK case itself. llvmpipe has no VK_KHR_fragment_shader_barycentric, so even a complete build skips both shaders there for that reason (checked with #1444 alone: 117 of 234 pass, both SKIP). Note for review: it conflicts with #1444 in runtime/test/shaders/build.py, so whichever lands later needs a rebase, and a full standalone run needs both. AI-assisted: yes (Claude Code)
Tauwni commented 2026-11-28 23:06:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-28T23:06:46Z.


Closing: #822 (opened before this one, merged today) makes build.py and check.py take the f16 interpolation fallback from the device in the same way. Merging current main into this branch and keeping main's side of the three conflicts leaves no diff, so nothing here is left to land. This also frees one of my open pull request slots.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247207750 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2176#issuecomment-7247207750). Originally posted by [Tauwni](https://github.com/Tauwni) on 2026-11-28T23:06:46Z. --- Closing: #822 (opened before this one, merged today) makes `build.py` and `check.py` take the f16 interpolation fallback from the device in the same way. Merging current `main` into this branch and keeping main's side of the three conflicts leaves no diff, so nothing here is left to land. This also frees one of my open pull request slots.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2176
No description provided.