-
Notifications
You must be signed in to change notification settings - Fork 323
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
Added Apple Silicon support to WoA #167
base: main
Are you sure you want to change the base?
Added Apple Silicon support to WoA #167
Conversation
How do you differentiate M1/M1 Pro/M2/etc? |
Great question, not so great answer ... 😕 I tried to preserve compatibility with current code and from that perspective all M1s are identical - they have same frequency and same types of high/low efficiency cores. This is not optimal, but if I did not miss something, returning more information - like amount of cores - would require breaking changes and this change at least prevents failures on M1s. About distinguishing between M1 & M2, honestly I don't know. I don't have M2 to test it and did not find what string will be shown in Windows Registry for M2. I was hoping for different string or somebody updating the code when it will become problem. |
The current solution would likely produce wrong results on M2, which is a big no for cpuinfo. I'd rather have it report |
@Maratyszcza I checked I tried to check also other attributes, but as far as I am aware of, there is no way how to distinguish M1 & M2 at this moment 😕 (you can check attached screenshots of Windows Registry + output of I am not sure how to follow up on this due to inability to distinguish between those CPUs. Do we need distinction between M1 & M2? I mean they are both Apple Silicon, so reporting Apple Silicon would be technically correct in all cases and it's more question of if we need distinction between them for something? What do you think? |
@Maratyszcza Any ideas on how to proceed? Are you ok with suggested solution? |
Without the ability to distinguish variants of Apple Silicon all we can do is set I'd like to encourage you to check within Microsoft what other ways there can be to retrieve information about the cores. In particular, if you could get MIDR data for the cores, we could decode the microarchitecture and use them for ISA feature detection (e.g. Apple M2 supports BF16 and I8MM while Apple M1 doesn't). |
One hint might be the CP4020...CP5801 values reported in the registry. They are evidently different across M1 and M2, but it is unclear what they represent. CP4020 looks like MIDR, albeit a fake one, probably others are different system registers. |
This source snippet suggest that CP NNN these are indeed system registers. |
Added support for Apple Silicon.