Add AVX2 runtime checks (#10033)

automerge
This commit is contained in:
Trent Nelson 2020-05-13 13:19:22 -06:00 committed by GitHub
parent 13bc3f8094
commit cf8eb7700b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -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);
}
}
}
}