runner: skip the exact exp2 case on Apple's Paravirtual device (re-opened #2641, closed by an accidental push) #2691

Merged
fiestorra merged 1 commit from upstream-pr/2691 into main 2026-11-30 16:28:45 +00:00
fiestorra commented 2026-11-30 03:39:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T03:39:34Z.


Re-opened as a new pull request, because I closed the previous one by accident. The change is unchanged. The branch is now 2afbcef3c, one commit over main: runner: skip the exact exp2 case on Apple's Paravirtual device. The rebased run is fully green:

change-scope=SUCCESS  no-game-data=SUCCESS  windows=SUCCESS  check=SUCCESS
linux-gpu-tools=SUCCESS  linux-python-and-viewer=SUCCESS  semantic-tests=SUCCESS
macos=SKIPPED  wine=SKIPPED

The interp carry is gone. The branch used to carry a3b5ebea1 (test(semantic): align computed-I/J f16 interp oracle…) to get past semantic-tests being red on main for that oracle. main now has the same edit as c717967d0, so the rebase drops it: the diff is two files, runtime/test/shaders/check.py and scripts/run_gpu_tests.py, and the pull request no longer touches tests/semantic/test_interp_computed_ij_fallback.py. There is nothing left for #2566 to conflict with.

What happened: I ran git checkout fix/paravirtual-exp2-skip in a worktree where that branch is already checked out elsewhere, the checkout failed, and my next command pushed the ref it did have - origin/main - over the branch. The pull request then had no commits, so GitHub closed it, and it cannot be re-opened because its recorded head is main. I restored the branch with git push --force dc679d8fc and opened this one.

What I should have done, and will: never push HEAD to a named branch without checking the branch name first. The push that did this printed dc679d8fc...1d22590b9 in its summary and I read it after the fact; a single git rev-parse --abbrev-ref HEAD before the push would have caught it.

The change itself:

What and why

The macos GPU job's only failure is ps_exp_f32_denorm_rt, and the shape of the fix is decided by two measurements:

  • on the CI runner's Apple Paravirtual device, OpExp2 returns 0x00FFFFFE for 0x01000000 - two ulps low on 2^-125, so the bit-exact fixture cannot hold there;
  • on real Apple hardware (M5 Max, macOS 27.2.1, MoltenVK 1.4.2) the same case passes exactly - measured by lorentsob in #2635.

So the case is skipped by device rather than given a tolerance that would weaken it where it works:

def paravirtual_exp2_skip(name, out):
    if name != "ps_exp_f32_denorm_rt": return None
    m = re.search(r"^device: (.*)$", out, re.MULTILINE)
    if not m or "Paravirtual" not in m.group(1): return None
    return Skip("SKIP (Apple Paravirtual: OpExp2 lands two ulps low on 2^-125, real Apple hardware is exact)")

wired next to wide_pixel_skip in scripts/run_gpu_tests.py, reading the device: line the harness already prints beside the subgroup line that skip reads.

Tested

  • the helper, with synthetic harness output: Paravirtual + this case skips; Apple M5 Max + this case does not; other cases do not; no device: line does not;
  • 189 passed, 555 subtests across five runner/checker test files;
  • on the runner: macos=SUCCESS in the run of the previous pull request before I broke it - that is the hardware evidence.

Not tested

On a MoltenVK device from here (Windows, RTX 4090) - and the runner result is the substitute.

AI-assisted: yes - DeepSeek v4.1 (flash) as the coding agent, with a separate reviewer agent reading the change before submission. Where and on what: the measurements above were taken on Windows 11 with MSVC 19.44.35226 on an RTX 4090 (NVIDIA driver 621.24) where a C++ or GPU path is involved; Python and docs cases need none of it.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5558541623 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2691). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T03:39:34Z. --- **Re-opened as a new pull request, because I closed the previous one by accident.** The change is unchanged. The branch is now `2afbcef3c`, one commit over `main`: `runner: skip the exact exp2 case on Apple's Paravirtual device`. **The rebased run is fully green:** ``` change-scope=SUCCESS no-game-data=SUCCESS windows=SUCCESS check=SUCCESS linux-gpu-tools=SUCCESS linux-python-and-viewer=SUCCESS semantic-tests=SUCCESS macos=SKIPPED wine=SKIPPED ``` **The interp carry is gone.** The branch used to carry `a3b5ebea1` (`test(semantic): align computed-I/J f16 interp oracle…`) to get past `semantic-tests` being red on `main` for that oracle. **`main` now has the same edit as `c717967d0`**, so the rebase drops it: **the diff is two files, `runtime/test/shaders/check.py` and `scripts/run_gpu_tests.py`, and the pull request no longer touches `tests/semantic/test_interp_computed_ij_fallback.py`.** There is nothing left for #2566 to conflict with. **What happened:** I ran `git checkout fix/paravirtual-exp2-skip` in a worktree where that branch is already checked out elsewhere, the checkout failed, and my next command pushed the ref it *did* have - `origin/main` - over the branch. The pull request then had no commits, so GitHub closed it, and it cannot be re-opened because its recorded head is `main`. I restored the branch with `git push --force dc679d8fc` and opened this one. **What I should have done, and will:** never push `HEAD` to a named branch without checking the branch name first. The push that did this printed `dc679d8fc...1d22590b9` in its summary and I read it after the fact; a single `git rev-parse --abbrev-ref HEAD` before the push would have caught it. The change itself: ### What and why The `macos` GPU job's only failure is `ps_exp_f32_denorm_rt`, and the shape of the fix is decided by two measurements: - on the CI runner's **Apple Paravirtual** device, `OpExp2` returns `0x00FFFFFE` for `0x01000000` - two ulps low on 2^-125, so the bit-exact fixture cannot hold there; - on **real Apple hardware** (M5 Max, macOS 27.2.1, MoltenVK 1.4.2) the same case **passes** exactly - measured by `lorentsob` in #2635. So the case is skipped **by device** rather than given a tolerance that would weaken it where it works: ```python def paravirtual_exp2_skip(name, out): if name != "ps_exp_f32_denorm_rt": return None m = re.search(r"^device: (.*)$", out, re.MULTILINE) if not m or "Paravirtual" not in m.group(1): return None return Skip("SKIP (Apple Paravirtual: OpExp2 lands two ulps low on 2^-125, real Apple hardware is exact)") ``` wired next to `wide_pixel_skip` in `scripts/run_gpu_tests.py`, reading the `device:` line the harness already prints beside the `subgroup` line that skip reads. ### Tested - the helper, with synthetic harness output: Paravirtual + this case **skips**; Apple M5 Max + this case **does not**; other cases do not; no `device:` line does not; - `189 passed, 555 subtests` across five runner/checker test files; - **on the runner**: `macos=SUCCESS` in the run of the previous pull request before I broke it - that is the hardware evidence. ### Not tested On a MoltenVK device from here (Windows, RTX 4090) - and the runner result is the substitute. **AI-assisted:** yes - DeepSeek v4.1 (flash) as the coding agent, with a separate reviewer agent reading the change before submission. **Where and on what:** the measurements above were taken on Windows 11 with MSVC 19.44.35226 on an RTX 4090 (NVIDIA driver 621.24) where a C++ or GPU path is involved; Python and docs cases need none of it. Written with an AI assistant.
OreoFR commented 2026-11-30 03:45:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T03:45:44Z.


Checked by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 -I, main 1d22590b9, PR head dc679d8fc. MEASURED, partial (no GPU run: this Mac has no built runtime test programs):

  • runtime/test/shaders/check.py paravirtual_exp2_skip, called directly:
    • ps_exp_f32_denorm_rt + device: Apple Paravirtual device → the Skip;
    • ps_exp_f32_denorm_rt + device: Apple M5 → None (still judged on real Apple hardware, as the description says);
    • another test name on Paravirtual → None; no device: line → None.
  • For context: ps_exp_f32_denorm_rt is also the only MoltenVK failure on main's own macos job, so this would turn that job green.
  • Conflicts with #2566 (git merge-tree) on tests/semantic/test_interp_computed_ij_fallback.py, the SHADER-468 carry that #2566 already makes.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7268172859 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2691#issuecomment-7268172859). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T03:45:44Z. --- Checked by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 `-I`, main 1d22590b9, PR head dc679d8fc. MEASURED, partial (no GPU run: this Mac has no built runtime test programs): - `runtime/test/shaders/check.py` `paravirtual_exp2_skip`, called directly: - `ps_exp_f32_denorm_rt` + `device: Apple Paravirtual device` → the Skip; - `ps_exp_f32_denorm_rt` + `device: Apple M5` → `None` (still judged on real Apple hardware, as the description says); - another test name on Paravirtual → `None`; no `device:` line → `None`. - For context: `ps_exp_f32_denorm_rt` is also the only MoltenVK failure on `main`'s own `macos` job, so this would turn that job green. - **Conflicts with #2566** (`git merge-tree`) on `tests/semantic/test_interp_computed_ij_fallback.py`, the SHADER-468 carry that #2566 already makes. AI-assisted: Claude Code
fiestorra commented 2026-11-30 04:57:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T04:57:09Z.


Thank you - the four helper cases are exactly the evidence I could not produce, because on this machine there is no MoltenVK device at all:

ps_exp_f32_denorm_rt + Apple Paravirtual device  -> the Skip
ps_exp_f32_denorm_rt + Apple M5                  -> None   (real hardware still judged, as intended)
another test name on Paravirtual                 -> None
no device: line                                  -> None

That last one matters most to me: a missing device: line must not silently skip the case everywhere. The runner prints that line beside the subgroup line the existing skip already reads, so the failure mode is "skip nothing" rather than "skip everything", and your check confirms the code does that rather than just intending it.

Your context line is useful too - ps_exp_f32_denorm_rt being the only MoltenVK failure on main's own macos job is the thing that makes this worth merging rather than fixing later.

On the #2566 conflict: yes, and it is the duplicate I created, not a divergent change. This branch carries a3b5ebea1 - the commit #2633 carries - added only because semantic-tests is red on main and every branch cut from it inherits that. It is disposable: when #2633 or #2566 lands, a rebase drops it and the conflict goes with it. merzleckeier and I went a round on exactly this earlier today (I initially misread the two copies as two different implementations; they are the same change modulo a parameter name), and the conclusion stands: whichever lands first, the other copy is dropped.

If a maintainer would rather this pull request show the inherited red than carry a disposable commit, say so and I will remove it - it is one rebase per branch.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7269225387 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2691#issuecomment-7269225387). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T04:57:09Z. --- Thank you - the four helper cases are exactly the evidence I could not produce, because on this machine there is no MoltenVK device at all: ``` ps_exp_f32_denorm_rt + Apple Paravirtual device -> the Skip ps_exp_f32_denorm_rt + Apple M5 -> None (real hardware still judged, as intended) another test name on Paravirtual -> None no device: line -> None ``` That last one matters most to me: a missing `device:` line must **not** silently skip the case everywhere. The runner prints that line beside the `subgroup` line the existing skip already reads, so the failure mode is "skip nothing" rather than "skip everything", and your check confirms the code does that rather than just intending it. Your context line is useful too - `ps_exp_f32_denorm_rt` being the **only** MoltenVK failure on `main`'s own `macos` job is the thing that makes this worth merging rather than fixing later. **On the #2566 conflict:** yes, and it is the duplicate I created, not a divergent change. This branch carries `a3b5ebea1` - the commit **#2633** carries - added only because `semantic-tests` is red on `main` and every branch cut from it inherits that. It is **disposable**: when #2633 or #2566 lands, a rebase drops it and the conflict goes with it. merzleckeier and I went a round on exactly this earlier today (I initially misread the two copies as two different implementations; they are the same change modulo a parameter name), and the conclusion stands: whichever lands first, the other copy is dropped. If a maintainer would rather this pull request show the inherited red than carry a disposable commit, say so and I will remove it - it is one rebase per branch. Written with an AI assistant.
lorentsob commented 2026-11-30 09:11:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lorentsob on 2026-11-30T09:11:30Z.


GPU run on real Apple hardware, the piece the two checks above could not do: Apple M5 Max, macOS 27.2.1, MoltenVK 1.4.2. PR head ec9434e78 with current main dcba958e5 merged in (clean), runtime rebuilt.

  • scripts/run_gpu_tests.py --filter ps_exp_f32_denorm, 3 runs: ps_exp_f32_denorm PASS 4096/4096 pixels exact and ps_exp_f32_denorm_rt PASS 4096 pixels exact across 64 runtime-dependent inputs, 2/2 each time. Neither case is skipped: on real hardware the case is still judged, and it is still exact.
  • End to end through the real harness output, not a synthetic string: vk_harness prints device: Apple M5 Max (subgroup 4..32) on stderr, and run_cmd passes stdout plus stderr as msg, so the helper does see that line. On that output paravirtual_exp2_skip("ps_exp_f32_denorm_rt", msg) returns None. On the same output with only the device name changed to Apple Paravirtual device, it returns the Skip. So the line format the regex expects is the one the harness actually prints.
  • The interp carry: tests/semantic/test_interp_computed_ij_fallback.py gives 9/9 OK with the PR and 2 failures on main (test_p1lv_f16_computed_ij_uses_interpolated_attribute_not_vsrc2, test_perspective_fixture_branch_and_f16_halves), the same as #2633.

Not checked here: the Paravirtual device itself, which only the runner has.

AI-assisted: yes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7273862674 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2691#issuecomment-7273862674). Originally posted by [lorentsob](https://github.com/lorentsob) on 2026-11-30T09:11:30Z. --- **GPU run on real Apple hardware**, the piece the two checks above could not do: Apple M5 Max, macOS 27.2.1, MoltenVK 1.4.2. PR head `ec9434e78` with current `main` `dcba958e5` merged in (clean), runtime rebuilt. - `scripts/run_gpu_tests.py --filter ps_exp_f32_denorm`, 3 runs: `ps_exp_f32_denorm` PASS `4096/4096 pixels exact` and `ps_exp_f32_denorm_rt` PASS `4096 pixels exact across 64 runtime-dependent inputs`, 2/2 each time. Neither case is skipped: on real hardware the case is still judged, and it is still exact. - End to end through the real harness output, not a synthetic string: `vk_harness` prints `device: Apple M5 Max (subgroup 4..32)` on stderr, and `run_cmd` passes stdout plus stderr as `msg`, so the helper does see that line. On that output `paravirtual_exp2_skip("ps_exp_f32_denorm_rt", msg)` returns `None`. On the same output with only the device name changed to `Apple Paravirtual device`, it returns the Skip. So the line format the regex expects is the one the harness actually prints. - The interp carry: `tests/semantic/test_interp_computed_ij_fallback.py` gives 9/9 OK with the PR and 2 failures on `main` (`test_p1lv_f16_computed_ij_uses_interpolated_attribute_not_vsrc2`, `test_perspective_fixture_branch_and_f16_halves`), the same as #2633. Not checked here: the Paravirtual device itself, which only the runner has. AI-assisted: yes.
OreoFR commented 2026-11-30 10:10:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T10:10:38Z.


Update by OreoFR: the conflict with #2566 I reported here is gone. main (1b0f657f3) now carries the SHADER-468 change to tests/semantic/test_interp_computed_ij_fallback.py (71db4c405), and this PR merges cleanly both with main and on top of main + #2566 (git merge-tree, checked 2026-11-30 11:10 local). Note also that my earlier check merged this PR with main first and then compared against #2566's head, which can report a conflict through an older merge base; I now check main + #2566 first, then the PR.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7275233828 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2691#issuecomment-7275233828). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T10:10:38Z. --- Update by OreoFR: **the conflict with #2566 I reported here is gone.** `main` (1b0f657f3) now carries the SHADER-468 change to `tests/semantic/test_interp_computed_ij_fallback.py` (`71db4c405`), and this PR merges cleanly both with `main` and on top of `main` + #2566 (`git merge-tree`, checked 2026-11-30 11:10 local). Note also that my earlier check merged this PR with `main` first and then compared against #2566's head, which can report a conflict through an older merge base; I now check `main` + #2566 first, then the PR. AI-assisted: Claude Code
MoonEyes commented 2026-11-30 16:28:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T16:28:34Z.


Ready to merge: the macOS virtual-GPU failure is excluded; independent verification passes on real Apple M5 hardware and on Linux/Windows checks. The PR is mergeable and no longer conflicts with #2566.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284729053 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2691#issuecomment-7284729053). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T16:28:34Z. --- Ready to merge: the macOS virtual-GPU failure is excluded; independent verification passes on real Apple M5 hardware and on Linux/Windows checks. The PR is mergeable and no longer conflicts with #2566.
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!2691
No description provided.