Skip to content
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

fix: invalid bit for detecting avx512 feature #1545

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

silver-ymz
Copy link
Contributor

@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) some time within the next two weeks.

@@ -200,6 +206,7 @@ pub(crate) fn detect_features() -> cache::Initializer {
// For AVX-512 the OS also needs to support saving/restoring
// the extended state, only then we enable AVX-512 support:
if os_avx512_support {
enable(extended_features_eax, 5, Feature::avx512bf16);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the reference, we should get this bit in the output eax register of __cpuid_count(7, 1).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in new commit

@Amanieu Amanieu force-pushed the fix/avx512-detect branch from 93f7697 to caca7c9 Compare March 5, 2024 22:43
@Amanieu Amanieu merged commit e50b2f6 into rust-lang:master Mar 5, 2024
27 checks passed
@silver-ymz silver-ymz deleted the fix/avx512-detect branch March 6, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants