arnaucube
arnaucube/hyperplonkPublic Self-hosted repository
hyperplonk/scripts/run_benchmarks.m4
scripts/run_benchmarks.m4Raw
 1#!/bin/bash
 2
 3# m4_ignore(
 4echo "This is just a script template, not the script (yet) - pass it to 'argbash' to fix this." >&2
 5exit 11  #)Created by argbash-init v2.10.0
 6# ARG_OPTIONAL_BOOLEAN([asm])
 7# ARG_OPTIONAL_BOOLEAN([multi_threads])
 8# ARG_HELP([<Hyperplonk benchmarks>])
 9# ARGBASH_GO
10
11# [ <-- needed because of Argbash
12
13if [ "$_arg_multi_threads" = on ]
14then
15  echo "Multi-threads: ON"
16  # Do nothing
17else
18  echo "Multi-threads: OFF"
19  export RAYON_NUM_THREADS=1
20fi
21
22if [ "$_arg_asm" = on ]
23then
24  echo "Asm feature: ON"
25  export RUSTFLAGS="-C target-feature=+bmi2,+adx"
26else
27  echo "Asm feature: OFF"
28  # Do nothing
29fi
30
31# Run the benchmark binary
32cargo +nightly bench
33
34
35# ^^^  TERMINATE YOUR CODE BEFORE THE BOTTOM ARGBASH MARKER  ^^^
36
37# ] <-- needed because of Argbash