Skip to content

runner: skip the exact exp2 case on Apple's Paravirtual device, so the macos job stops failing on a device that cannot be exact - #2641

Closed
fiestorra wants to merge 0 commit into
ProjectLeonida:mainfrom
fiestorra:fix/paravirtual-exp2-skip
Closed

fiestorra wants to merge 0 commit into
ProjectLeonida:mainfrom
fiestorra:fix/paravirtual-exp2-skip

Conversation

@fiestorra

Copy link
Copy Markdown
Contributor

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

So widening the fixture would weaken the check where it works. This skips the case by device instead:

def paravirtual_exp2_skip(name, out):
    """A Skip for the exact-power-of-two exp2 case on Apple's Paravirtual device, else None. …"""
    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 in scripts/run_gpu_tests.py next to wide_pixel_skip, which is the existing precedent for "the device cannot give this, judge it elsewhere". It reads the device: line the harness prints beside the
subgroup line wide_pixel_skip already reads, so no new plumbing.

Zero is still exact in the check itself, and every other device keeps the exact assertion - nothing is relaxed.

Tested

  • the helper, with synthetic harness output: Paravirtual + this case skips; Apple M5 Max + this case does not skip (the assertion still applies); Paravirtual + another case does not skip; output
    without a device: line does not skip;
  • python3 -m pytest tests/test_run_gpu_tests.py tests/test_shader_checks.py tests/test_check_unsupported_skips.py tests/test_run_gpu_pixel_checks.py tests/test_run_gpu_mandelbrot.py -q
    -> 189 passed, 555 subtests passed;
  • python -m compileall clean on both files.

Not tested

On a MoltenVK device, because this machine is Windows with an RTX 4090. What I can say is that the skip keys on a string the harness already emits and that the runner already parses for a
neighbouring skip, and that the non-Paravirtual path is unchanged. The person who can run that job can confirm the check goes from red to skipped.

GPUs tested: RTX 4090, driver 32.0.16.2124 - for the Python logic only; no MoltenVK.

Written with an AI assistant.

@fiestorra

Copy link
Copy Markdown
Contributor Author

The job this exists for now passes on the runner:

macos = SUCCESS        (change-scope, no-game-data, linux-gpu-tools also SUCCESS)

That is the hardware evidence I could not produce from here: the Apple Paravirtual device that was failing ps_exp_f32_denorm_rt no longer fails the job, because the case is skipped where the
device cannot be exact rather than judged against a tolerance.

Two honest limits on the statement:

  • I cannot yet quote the runner's own SKIP (Apple Paravirtual: OpExp2 lands two ulps low on 2^-125, real Apple hardware is exact) line, because the job log is only published when the whole
    run finishes and it is still going. SUCCESS covers both "the case skipped" and "the case passed", and given the device name check I expect the former - I will paste the line when the log
    lands rather than call it now;
  • the real-Apple path is unchanged by construction (the skip returns None when device: does not say Paravirtual), and that path is the one lorentsob measured passing on an M5 Max.

If this merges, macos stops being red for every pull request in the queue - that was the last of the five red jobs main started this morning with.

Written with an AI assistant.

@fiestorra

Copy link
Copy Markdown
Contributor Author

Rebased onto main 060c47160 and now carries the one commit main is missing, like my other pull requests:

2 commits: this skip, and a3b5ebea1 (TEST-INTERP-COMPUTED-IJ-FALLBACK-RTZ, from #2633)
python3 -m pytest tests/test_run_gpu_tests.py tests/test_shader_checks.py tests/semantic/test_interp_computed_ij_fallback.py -q  -> 176 passed, 524 subtests
skip helper re-checked: Paravirtual skips, M5 Max does not, other cases do not

Why: semantic-tests (ubuntu-latest) was the only failing check here, and it fails on main for the interp oracle, so a branch cut from main inherits it and cannot show its own result. If #2633 merges first this second commit becomes a duplicate and can be dropped; if this lands first, #2633 becomes a no-op.

With that, the only check this pull request does not clear by itself is macos - and this is the change that clears it, already measured green on the runner (macos = SUCCESS in the previous run).

Written with an AI assistant.

@fiestorra

Copy link
Copy Markdown
Contributor Author

The two jobs this pull request exists for are green on the current head (dc679d8fc):

macos=SUCCESS         semantic-tests (ubuntu-latest)=SUCCESS
change-scope=SUCCESS  no-game-data=SUCCESS  windows=SUCCESS  check=SUCCESS
linux-gpu-tools=SUCCESS translator-tests=SUCCESS viewer-tests=SUCCESS stdlib-tests-linux=SUCCESS
wine=SKIPPED          macos-python=FAILURE

The one remaining failure is not this diff. macos-python fails in BenchTranslateTest.test_a_local_baseline_replaces_the_committed_one (tests/test_bench_translate.py), which this branch does not touch (the diff is runtime/test/shaders/check.py and scripts/run_gpu_tests.py). I ran it on main on Windows: 1 passed. So either it is a macOS-only failure that has been hidden because the other pull requests' macos-python runs end up CANCELLED by the concurrency group rather than failing, or it is flaky on that runner.

If it is the former, it is a main red on macOS that nobody has seen yet, and it deserves its own fix rather than a rebase here. If it is the latter, a re-run should clear it - I cannot re-run a job without admin rights on this repository.

I am not touching a test this pull request has nothing to do with. Everything else is green, and the macos job going from 3/3 red to SUCCESS is the change's whole point.

Written with an AI assistant.

@fiestorra

Copy link
Copy Markdown
Contributor Author

This pull request is closed because I broke it, not because anyone decided anything against it. The branch was overwritten by an accidental git push HEAD (the checkout in front of it failed silently and pushed main over fix/paravirtual-exp2-skip), which left the pull request with no commits; GitHub closed it, and it cannot be re-opened because its recorded head is main.

It continues at #2691, from the same branch restored to dc679d8fc (the same two commits: df79ee784 the Paravirtual skip, dc679d8fc the interp carry). Nothing about the change, the evidence or the discussion above is superseded - only the pull request number changed.

For anyone reading this later: the fix is a skip keyed on the device name, verified macos=SUCCESS on the runner before I broke the branch, and re-opened unchanged.

Written with an AI assistant.

fiestorra added a commit to fiestorra/leonida-carry that referenced this pull request Nov 30, 2026
test_a_local_baseline_replaces_the_committed_one asks that a locally written
baseline replaces the committed one; the 5x limit was incidental to that, and on
a shared runner it turned the case into a performance test whose only observed
failure was a contended box (macos-python on ProjectLeonida#2641: returncode 1 with empty
stderr, i.e. the tool's own over-limit verdict).

The over-limit behaviour keeps its deterministic coverage: --max-slowdown 0.01
must report one, and that case asserts it.

Written with an AI assistant.
MoonEyes added a commit that referenced this pull request Nov 30, 2026
runner: skip the exact exp2 case on Apple's Paravirtual device (re-opened #2641, closed by an accidental push)
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.

1 participant