From cf8eb7700b79a6eb638eb58964fd2ffb4650f2ad Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Wed, 13 May 2020 13:19:22 -0600 Subject: [PATCH] Add AVX2 runtime checks (#10033) automerge --- core/src/validator.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/src/validator.rs b/core/src/validator.rs index 8776a06c59..371a5f7b75 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -767,6 +767,15 @@ fn report_target_features() { process::exit(1); } } + #[target_feature(enable = "avx2")] + { + if is_x86_feature_detected!("avx2") { + info!("AVX2 detected"); + } else { + error!("Your machine does not have AVX2 support, please rebuild from source on your machine"); + process::exit(1); + } + } } }