Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3048 +/- ##
=======================================
Coverage 84.27% 84.27%
=======================================
Files 258 258
Lines 57421 57430 +9
Branches 4911 4911
=======================================
+ Hits 48392 48401 +9
Misses 8205 8205
Partials 824 824
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
EdCaunt
reviewed
Oct 14, 2026
EdCaunt
left a comment
Contributor
There was a problem hiding this comment.
Not unreasonable, but lots of noise in here.
mloubout
approved these changes
Oct 14, 2026
ggorman
force-pushed
the
fix-apple-silicon-detection
branch
2 times, most recently
from
October 21, 2026 16:21
bc74301 to
6ec05f7
Compare
Contributor
Author
|
Rebased onto main and squashed to the one archinfo.py change. Since your review the same miss hit #3075 and #3074 (runs 39303223750 and 39622887638, header |
ggorman
force-pushed
the
fix-apple-silicon-detection
branch
from
October 21, 2026 22:22
6ec05f7 to
6ce643e
Compare
This was referenced Oct 22, 2026
`get_platform` only recognised Apple silicon through `'m1' in brand`, so
an "Apple M2/M3/M4 ..." brand string fell through to ANYCPU. On such a
machine `skipif('cpu64-arm')` does not fire and tests that force an x86
platform (e.g. `test_nested_nthreads` with `knl7210`) emit x86 intrinsics
headers that clang rejects on arm64. The macOS CI job has detected both
`m1` and `cpu64` on the same runner image; it does not print the brand,
so this hole is one confirmed cause of such misses, not necessarily the
only one.
Map any "apple m<N>" brand to the registered AppleArm of that generation,
falling back to the newest registered one for chips not yet listed (the
actual `march` is derived at runtime by `AppleArm.march`). The lookup is a
pure function so it is tested without stubbing `get_cpu_info`.
ggorman
force-pushed
the
fix-apple-silicon-detection
branch
from
October 22, 2026 16:27
6ce643e to
2bc1bb6
Compare
EdCaunt
approved these changes
Oct 23, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
get_platform()recognises Apple silicon only via'm1' in brand(devito/arch/archinfo.py). A brand string such as "Apple M2 Pro" or "Apple M4 Max" falls through toANYCPU, so@skipif('cpu64-arm')does not fire.tests/test_autotuner.py::test_nested_nthreadsthen runs withplatform='knl7210', the generated code includesxmmintrin.h/pmmintrin.h, and Homebrew clang on arm64 rejects it:Seen on #3047: that run had zero
Arm doesn't support x86-specific instructionsskips across the suite, while themainrun the day before (same image, same LLVM 23.1.0) skipped the test.macOS CI misses this bears on
The
pytest-osx-py312-clang-omp-basejob prints the detected platform in its header. On the samemacos-26-arm64image (20261013.0424):platform: m1platform: cpu64test_nested_nthreadsCompileErrorplatform: cpu64test_nested_nthreadsCompileError andtest_gradient.py::TestGradient::test_gradient_equivalence[...float64-1e-13...](alsoskipif('cpu64-arm')) failsallcloseEach miss costs a 35-40 minute osx job plus a full rerun of the workflow. The job does not print the brand string, so the cause of these particular misses is unconfirmed: a host chip newer than M1 is fixed here; a brand missing because py-cpuinfo's helper subprocess failed is not, and still falls through to
cpu64.Fix
Map any
apple m<N>brand to the registeredAppleArmof that generation, falling back to the newest registered one for chips not yet listed;AppleArm.marchderives the actual-mcpuat runtime fromsysctl. The lookup is a small pure function,get_apple_platform, so it can be tested without stubbingget_cpu_info;tests/test_arch.py::test_apple_platformcovers M1 to M5 brand strings, as asked in review.Check
Besides the test, calling
get_platformwithget_cpu_infostubbed to "Apple M1 (Virtual)", "Apple M2 Pro", "Apple M3 Max", "Apple M4 Max" and "Apple M5" yieldsm1,m2,m3,m3,m3, allAppleArm; Xeon, EPYC and Neoverse brands are unchanged. Before the change only the M1 string resolves toAppleArm.🤖 Generated with Claude Code