-
-
Notifications
You must be signed in to change notification settings - Fork 442
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
Compile error with stdarch_x86_avx512
feature not enable
#1550
Comments
Thanks for the report. I think all we need to "fix" this for your CPU is to enable the feature flag: diff --git a/src/lib.rs b/src/lib.rs
index 54ae884025..623637f1ef 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -49,6 +49,7 @@
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
#![no_std]
#![cfg_attr(feature = "simd_support", feature(portable_simd))]
+#![cfg_attr(all(feature = "simd_support", target_feature = "avx512bw"), feature(stdarch_x86_avx512))]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![allow(
clippy::float_cmp, Can you test this? Aside: |
Thank you, this fix has allowed my code to compile successfully without encountering the previous errors. |
Cool. Send a PR and I'll merge it. We don't need a CHANGELOG entry. I'm investigating whether or not we should use run-time detection for CPU features, but that's another matter. |
(Fixed in #1551.) |
When I compile my codes with
rand v0.9.0-beta.1
and a computer hasavx512
, the compiler return following error. It seems like that the attribute#![feature(stdarch_x86_avx512)]
is not enabled correctly inrand
.The text was updated successfully, but these errors were encountered: