You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we don't generate binary wheels for macs with Apple Silicon, and the only option is to use the slower, interpreted version of mypy when using an ARM CPython build. A compiled wheel could up to 4x faster than the interpreted one.
cibuildwheel (https://github.com/joerick/cibuildwheel), which we use to compile wheels, now supports cross-compiling arm64 wheels for Apple Silicon on Intel. We should generate arm64 wheels for macOS. We can support at least Python 3.9 and possibly 3.8 (https://bugs.python.org/msg382939). Just supporting 3.9 would be okay.
Building the wheels happens in a GitHub action here.
Would anybody to like to try this out? If you can generate the wheels, I can help test them, since I have a Mac with Apple Silicon.
Hey @JukkaL, I briefly went through the workflows/build.yml just now. What should I do next, to modifymypy/misc/build_wheel.py or build wheels locally?
@97littleleaf11 You can modify misc/build_wheel.py to also generate arm64 wheels when running on macOS and Python 3.9. I think that you can use CIBW_ARCHS_MACOS to define the platforms. We don't want universal wheels, since they will be much bigger. If you will create a PR, I can try the wheel generation manually.
@97littleleaf11 Thanks for the PR! This seems to work great based on some quick experiments, with about 4.3x performance improvement. Here is a Python 3.9 arm64 wheel for the current GitHub master. More recent builds will appear here.
Activity
97littleleaf11 commentedon Feb 23, 2021
Hey @JukkaL, I briefly went through the
workflows/build.ymljust now. What should I do next, to modifymypy/misc/build_wheel.pyor build wheels locally?JukkaL commentedon Feb 23, 2021
@97littleleaf11 You can modify
misc/build_wheel.pyto also generatearm64wheels when running on macOS and Python 3.9. I think that you can useCIBW_ARCHS_MACOSto define the platforms. We don't want universal wheels, since they will be much bigger. If you will create a PR, I can try the wheel generation manually.97littleleaf11 commentedon Feb 26, 2021
@JukkaL I just made a PR about it.
Add Apple Silicon support when building wheels (#10145)
JukkaL commentedon Feb 27, 2021
@97littleleaf11 Thanks for the PR! This seems to work great based on some quick experiments, with about 4.3x performance improvement. Here is a Python 3.9 arm64 wheel for the current GitHub master. More recent builds will appear here.
henryiii commentedon Mar 4, 2021
That wheel works correctly for me on AS as well, thanks! (sorry for the delay, haven't had a chance to boot my AS machine back up till today 👶 )