-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for macOS/iOS with ARM64 CPU #121
Comments
On my M1 MacBook Pro 13" I have the following:
I've started adding support to query these on my machine and have it detecting a few of them now, but I'm having a hard time mapping between the Arm Features struct and the Apple optional names. Is there a description for what these mean on the |
I figured out why it wasn't detecting as
It's getting there but I still need to fix the part that isn't coming from the flags. |
There are also tables here https://github.com/pytorch/cpuinfo/blob/master/src/arm/mach/init.c |
I can certainly add a table entry for the M1 CPU, but do I just take the values from the docker instance of cpu_features? I'm not sure where to find a complete list of non-optional features implemented on the CPU. |
To be clear, we are definitely interested in supporting Apple M1 but we are willing to wait a bit for the M1 build ecosystem to settle as it is unclear yet how to make it work with Universal2 builds. |
Is there any fix possible to resolve the compile issue? It'd be very preferable to report an empty list of CPU features than to fail to compile. |
To add support AARCH64 for other operating systems such as macOS(Apple M1), ios, FreeBSD, Windows has been moved common logic from `src/impl_aarch64_linux_or_android.c` to `src/impl_aarch64__base_implementation.inl`, namely: * Definitions for introspection * `Aarch64Info` kEmptyAarch64Info field Removed include "internal/bit_utils.h" from `src/impl_aarch64_linux_or_android.c`, since this include was not used. Also, include `cpuinfo_aarch64` has been removed from linux implementation and replaced with `impl_aarch64__base_implementation.inl`, this include will be used for all other operating system impl as well Added a compilation check that matches the base X86 implementation Refs: google#121 See also: google#150, google#186, google#204
To add support AARCH64 for other operating systems such as macOS(Apple M1), ios, FreeBSD, Windows has been moved common logic from `src/impl_aarch64_linux_or_android.c` to `src/impl_aarch64__base_implementation.inl`, namely: * Definitions for introspection * `Aarch64Info` kEmptyAarch64Info field Removed include "internal/bit_utils.h" from `src/impl_aarch64_linux_or_android.c`, since this include was not used. Also, include `cpuinfo_aarch64` has been removed from linux implementation and replaced with `impl_aarch64__base_implementation.inl`, this include will be used for all other operating systems impl as well Added a compilation check that matches the base X86 implementation Refs: google#121 See also: google#150, google#186, google#204
This may also help with iOS?
Here is part of the
sysctl -a
from an Apple DTK. These can be queried withsysctlbyname
.The text was updated successfully, but these errors were encountered: