core:sys/info AVX-512 CPU Features #4376
Merged
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.
Adds AVX-512 feature detection to
core:sys/info
.Per a discussion in #package-dev in the Discord server, this adds each individual feature flag of AVX-512 (16 total) as individual entries in
CPU_Feature
, for a current total of 34CPU_Feature
values. 4FMAPS and 4VNNIW are excluded, as they don't have corresponding LLVM target features.XCR0 bits to check were sourced from the Intel Software Developer Manual, volume 1, section 15.2.
CPUID feature flag bits were sourced from the Intel Instruction Set Extensions document, section 1.4, table 1-3.
Note that there is an apparently an issue where this detection may report a false negative on Darwin systems; see a GitHub issue on the Go compiler. This issue is not addressed by these changes.