From 0a4fbc9c89a67b0ef7b9aad773b368c84561c3e6 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 25 Sep 2024 04:23:42 +0000 Subject: [PATCH] avx flags --- .gitignore | 3 ++- eval.sh | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f73c4d0..48b282c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ pgo-data.profdata COMMIT_HASH # Benchmark results -**/.csv \ No newline at end of file +**/.csv +**/*.csv \ No newline at end of file diff --git a/eval.sh b/eval.sh index a9c88d5..2b7c51a 100755 --- a/eval.sh +++ b/eval.sh @@ -44,10 +44,14 @@ else GPU_EXISTS=false fi -# Set the compilation flags. -# if [ "$GPU_EXISTS" = false ]; then -# export RUSTFLAGS='-C target-cpu=native' -# fi +# Check for AVX-512 support +if lscpu | grep -q avx512; then + # If AVX-512 is supported, add the specific features to RUSTFLAGS + export RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512ifma,+avx512vl" +else + # If AVX-512 is not supported, just set target-cpu=native + export RUSTFLAGS="-C target-cpu=native" +fi # Set the logging level. export RUST_LOG=info