Skip to content

Pin the MPS test leg to macos-15: torch 2.14's attention kernel cannot compile on the macos-latest virtual GPU - #1241

Merged
alanprior merged 7 commits into
mainfrom
alan/ci-torch-2-14-check
Sep 5, 2026
Merged

alanprior merged 7 commits into
mainfrom
alan/ci-torch-2-14-check

Conversation

@alanprior

@alanprior alanprior commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

What & why

Since torch 2.14.0, the only CI job that runs TabPFN on MPS, Test Package Compatibility (macos-latest, 3.14, highest), fails 50 tests with a Metal compiler error (unsupported deferred-static-alloca-size). GitHub's macos-latest image (macOS 26) runs on a virtual GPU that cannot compile the fp16/bf16 scaled_dot_product_attention kernel torch >= 2.14 uses on macOS 26. Physical Macs on macOS 26 compile it fine (verified on an M5 / macOS 26.3 with the same torch and tests; kornia reports the same for an M1), so nothing is wrong for users and torch is not capped.

Change

  • The 3.14 / highest macOS leg runs on macos-15, where torch does not use that kernel. Same fix as Pin macos-15 runner, as tests fail on macos-26. #1073 in June, with a TODO to retry macos-latest around November.
  • Nothing else changes: no dependency pin, other legs untouched.

Needs an admin

The required check is registered by name. Please replace Test Package Compatibility (macos-latest, 3.14, highest) with Test Package Compatibility (macos-15, 3.14, highest) in the "Restrict Main Branch" ruleset, otherwise this and every later PR waits forever on the old name.

Evidence

  • The failure reproduces on main's own tree: this PR's first commit is empty and the job failed identically on it (torch 2.14.0, same 50 tests). The same job passed the same morning with torch 2.13.0 on the same image.
  • A probe run on both images (added and removed again in this PR): with torch 2.14.0, every fp16/bf16 attention call with head dim >= 64 fails on macos-latest, and all 93 variants pass on macos-15.

alanprior and others added 2 commits September 4, 2026 23:04
No code change: this commit exists only so the pull_request workflow runs on
main's tree. The "Test Package Compatibility (macos-latest, 3.14, highest)"
job resolves the newest torch, and since torch 2.14.0 was released it fails
with Metal compiler errors ("unsupported deferred-static-alloca-size") while
building MPS kernels, on the same macos-26-arm64 image where torch 2.13.0
passed hours earlier. If this job fails here too, the breakage is torch 2.14.0
on that runner, independent of any open branch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Runs a dozen small MPS operations with torch 2.14.0 on macos-latest and on
macos-15, to learn whether a cheap probe detects the Metal 4 cooperative-tensor
compile failure on the virtual GPU, and which operations trigger it. Not meant
to merge.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comment thread .github/workflows/mps-probe.yml Fixed
…a mapping

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comment thread .github/workflows/mps-probe.yml Fixed
alanprior and others added 3 commits September 5, 2026 00:35
…dims and lengths

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…t compile torch's attention kernel

GitHub's macos-latest image (macos-26-arm64) runs on a virtual GPU. Since torch
2.14.0, the fp16/bf16 scaled_dot_product_attention kernel torch uses on macOS 26
fails to compile there ("unsupported deferred-static-alloca-size" from the Metal
compiler), which killed the 50 tests that run the model on MPS. Physical Macs
on macOS 26 compile the same kernel, so nothing in TabPFN or torch is wrong for
users; only this runner cannot run the tests.

The macOS "highest" leg now tries that exact attention call once before the
tests. If it compiles, the leg runs the tests as before. If it fails with the
Metal compile error, the leg emits a warning, skips its tests and stays green,
and a new job runs the same tests on macos-15, whose macOS 15 torch does not
use the new kernel. Any other failure of the check fails the leg. The fallback
job is skipped whenever macos-latest can compile the kernel again, so this
reverts itself when GitHub or torch fix the combination. No torch cap anywhere.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
It answered its question: a synthetic fp16 attention call with head dim >= 64
reproduces the compile failure on macos-latest and passes on macos-15.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@alanprior alanprior changed the title Verify CI against torch 2.14.0 with main's code unchanged Run the MPS tests on macos-15 when the macos-latest virtual GPU cannot compile torch's attention kernel Sep 4, 2026
@alanprior alanprior added the no changelog needed PR does not require a changelog entry label Sep 4, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ca17af2. Configure here.

Comment thread .github/workflows/ci.yml Outdated
@alanprior
alanprior requested a review from LeoGrin September 4, 2026 21:51
torch 2.14 uses a Metal 4 fp16/bf16 attention kernel on macOS 26 that the
macos-latest runner's virtual GPU cannot compile, so the only CI leg that
runs TabPFN on MPS failed 50 tests. Physical Macs are unaffected. Run that
leg on macos-15 for now, as done in June, and drop the probe-and-fallback
job added earlier in this PR.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@alanprior alanprior changed the title Run the MPS tests on macos-15 when the macos-latest virtual GPU cannot compile torch's attention kernel Pin the MPS test leg to macos-15: torch 2.14's attention kernel cannot compile on the macos-latest virtual GPU Sep 4, 2026

@LeoGrin LeoGrin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

@alanprior
alanprior enabled auto-merge September 4, 2026 23:58
@alanprior
alanprior disabled auto-merge September 5, 2026 16:39
@alanprior
alanprior added this pull request to the merge queue Sep 5, 2026
Merged via the queue into main with commit bfb5c57 Sep 5, 2026
18 checks passed
@alanprior
alanprior deleted the alan/ci-torch-2-14-check branch September 5, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog needed PR does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants