Skip to content

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

Merged
MoonEyes merged 1 commit into
ProjectLeonida:mainfrom
fiestorra:fix/paravirtual-exp2-skip
Nov 30, 2026
Merged

MoonEyes merged 1 commit into
ProjectLeonida:mainfrom
fiestorra:fix/paravirtual-exp2-skip

Conversation

@fiestorra

@fiestorra fiestorra commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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:

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.

@OreoFR

OreoFR commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

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

AI-assisted: Claude Code

@fiestorra
fiestorra force-pushed the fix/paravirtual-exp2-skip branch from dc679d8 to ec9434e Compare November 30, 2026 03:58
@fiestorra

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown

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 test(semantic): align computed-I/J f16 interp oracle with toward-zero p2 narrow (TEST-INTERP-COMPUTED-IJ-FALLBACK-RTZ carry) #2633.

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

AI-assisted: yes.

@OreoFR

OreoFR commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Update by OreoFR: the conflict with #2566 I reported here is gone. main (1b0f657) 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

That device's OpExp2 lands two ulps low on 2^-125, so the bit-exact fixture cannot
hold there; real Apple hardware returns the exact pattern (M5 Max, MoltenVK 1.4.2,
passes the same case), which is why this skips by device instead of widening the
check for everyone.

The skip reads the device line the harness already prints beside the subgroup line
that wide_pixel_skip reads, so it needs no new plumbing.

Written with an AI assistant.
@fiestorra
fiestorra force-pushed the fix/paravirtual-exp2-skip branch from ec9434e to 2afbcef Compare November 30, 2026 14:39
@MoonEyes

Copy link
Copy Markdown
Collaborator

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.

@MoonEyes
MoonEyes merged commit 08e42a5 into ProjectLeonida:main Nov 30, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants