-
Notifications
You must be signed in to change notification settings - Fork 267
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
Detect AVX512 on Darwin use GetDarwinSysCtlByName("hw.optional.avx512f") #153
Merged
Conversation
This file contains 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
Why clang-format failed? No diff at lease my local machine. |
/cc @natanbc |
Looks like |
@natanbc Should I also fix? if so, send another PR :D |
zchee
force-pushed
the
darwin-support-avx512
branch
from
April 7, 2021 07:16
ac472dc
to
9525f37
Compare
On Mon, Apr 5, 2021 at 11:08 AM Koichi Shiraishi ***@***.***>
wrote:yah it’s not d
Detect AVX512 on Darwin use GetDarwinSysCtlByName("hw.optional.avx512f")
On the below CPU, darwin support AVX512 with on-demand.
- I httpss
://github.com/apple/darwin-xnu/blob/xnu-7195.81.3/osfmk/i386/fpu.c#L173-L199
<https://github.com/apple/darwin-xnu/blob/xnu-7195.81.3/osfmk/i386/fpu.c#L173-L199>
arch : x86
brand : Intel(R) Xeon(R) W-2150B CPU @uof until he 3.00GHz
family : 6 (0x06)
model : 85 (0x55)
stepping : 4 (0x04)
uarch : INTEL_SKL
..
.
The So, detect os_support.have_avx512 to use
GetDarwinSysCtlByName("hw.optional.avx512f");, support Intel(R) Xeon
AVX512 on Darwin OS.
------------------------------
You can view, comment on, or merge this pull request online at:
#153
Commit Summary
- Detect AVX512 on Darwin use
GetDarwinSysCtlByName("hw.optional.avx512f")
File Changes
- *M* src/cpuinfo_x86.c
<https://github.com/google/cpu_features/pull/153/files#diff-48ebb1f03fc6c226c7555d24920f1ab58700afbeeb9b7bb32fefad7a887727c2>
(30)
Patch Links:
- https://github.com/google/cpu_features/pull/153.patch
- https://github.com/google/cpu_features/pull/153.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#153>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE4DSFPNG3BRGZ7MXHAM66LTHH4AHANCNFSM42NGW3RQ>
.
--
Cheers!
Mayank Tahilramani
|
@MayankTahil ohh..? what do you mean...? |
Mizux
approved these changes
Apr 17, 2021
@gchatelet sorry, just ping 🙇♂️ |
Thx @zchee for the PR! My apologies for the late reply. |
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.
Detect AVX512 on Darwin use GetDarwinSysCtlByName("hw.optional.avx512f")
On the below CPU, darwin support AVX512 with on-demand.
sysctl result is here:
So, detect
os_support.have_avx512
to useGetDarwinSysCtlByName("hw.optional.avx512f");
, support Intel(R) Xeon AVX512 on Darwin OS.after patched result on the same CPU: