mirror of
https://github.com/arnaucube/hyperplonk.git
synced 2026-01-10 16:11:29 +01:00
Batch all (#89)
- use sumcheck to batch open PCS - split Prod and witness into two batches - benchmark code
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# m4_ignore(
|
||||
echo "This is just a script template, not the script (yet) - pass it to 'argbash' to fix this." >&2
|
||||
exit 11 #)Created by argbash-init v2.10.0
|
||||
# ARG_OPTIONAL_BOOLEAN([asm])
|
||||
# ARG_OPTIONAL_BOOLEAN([multi_threads])
|
||||
# ARG_HELP([<Hyperplonk benchmarks>])
|
||||
# ARGBASH_GO
|
||||
|
||||
# [ <-- needed because of Argbash
|
||||
|
||||
if [ "$_arg_multi_threads" = on ]
|
||||
then
|
||||
echo "Multi-threads: ON"
|
||||
# Do nothing
|
||||
else
|
||||
echo "Multi-threads: OFF"
|
||||
export RAYON_NUM_THREADS=1
|
||||
fi
|
||||
|
||||
if [ "$_arg_asm" = on ]
|
||||
then
|
||||
echo "Asm feature: ON"
|
||||
export RUSTFLAGS="-C target-feature=+bmi2,+adx"
|
||||
else
|
||||
echo "Asm feature: OFF"
|
||||
# Do nothing
|
||||
fi
|
||||
|
||||
# Run the benchmark binary
|
||||
cargo +nightly bench
|
||||
|
||||
|
||||
# ^^^ TERMINATE YOUR CODE BEFORE THE BOTTOM ARGBASH MARKER ^^^
|
||||
|
||||
# ] <-- needed because of Argbash
|
||||
@@ -1,106 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
# Created by argbash-init v2.10.0
|
||||
# ARG_OPTIONAL_BOOLEAN([asm])
|
||||
# ARG_OPTIONAL_BOOLEAN([multi_threads])
|
||||
# ARG_HELP([<Hyperplonk benchmarks>])
|
||||
# ARGBASH_GO()
|
||||
# needed because of Argbash --> m4_ignore([
|
||||
### START OF CODE GENERATED BY Argbash v2.10.0 one line above ###
|
||||
# Argbash is a bash code generator used to get arguments parsing right.
|
||||
# Argbash is FREE SOFTWARE, see https://argbash.io for more info
|
||||
|
||||
|
||||
die()
|
||||
{
|
||||
local _ret="${2:-1}"
|
||||
test "${_PRINT_HELP:-no}" = yes && print_help >&2
|
||||
echo "$1" >&2
|
||||
exit "${_ret}"
|
||||
}
|
||||
|
||||
|
||||
begins_with_short_option()
|
||||
{
|
||||
local first_option all_short_options='h'
|
||||
first_option="${1:0:1}"
|
||||
test "$all_short_options" = "${all_short_options/$first_option/}" && return 1 || return 0
|
||||
}
|
||||
|
||||
# THE DEFAULTS INITIALIZATION - OPTIONALS
|
||||
_arg_asm="off"
|
||||
_arg_multi_threads="off"
|
||||
|
||||
|
||||
print_help()
|
||||
{
|
||||
printf '%s\n' "<Hyperplonk benchmarks>"
|
||||
printf 'Usage: %s [--(no-)asm] [--(no-)multi_threads] [-h|--help]\n' "$0"
|
||||
printf '\t%s\n' "-h, --help: Prints help"
|
||||
}
|
||||
|
||||
|
||||
parse_commandline()
|
||||
{
|
||||
while test $# -gt 0
|
||||
do
|
||||
_key="$1"
|
||||
case "$_key" in
|
||||
--no-asm|--asm)
|
||||
_arg_asm="on"
|
||||
test "${1:0:5}" = "--no-" && _arg_asm="off"
|
||||
;;
|
||||
--no-multi_threads|--multi_threads)
|
||||
_arg_multi_threads="on"
|
||||
test "${1:0:5}" = "--no-" && _arg_multi_threads="off"
|
||||
;;
|
||||
-h|--help)
|
||||
print_help
|
||||
exit 0
|
||||
;;
|
||||
-h*)
|
||||
print_help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
_PRINT_HELP=yes die "FATAL ERROR: Got an unexpected argument '$1'" 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
parse_commandline "$@"
|
||||
|
||||
# OTHER STUFF GENERATED BY Argbash
|
||||
|
||||
### END OF CODE GENERATED BY Argbash (sortof) ### ])
|
||||
# [ <-- needed because of Argbash
|
||||
|
||||
cargo clean
|
||||
|
||||
if [ "$_arg_multi_threads" = on ]
|
||||
then
|
||||
echo "Multi-threads: ON"
|
||||
# Do nothing
|
||||
else
|
||||
echo "Multi-threads: OFF"
|
||||
export RAYON_NUM_THREADS=1
|
||||
fi
|
||||
|
||||
if [ "$_arg_asm" = on ]
|
||||
then
|
||||
echo "Asm feature: ON"
|
||||
export RUSTFLAGS="-C target-feature=+bmi2,+adx"
|
||||
else
|
||||
echo "Asm feature: OFF"
|
||||
# Do nothing
|
||||
fi
|
||||
cd hyperplonk
|
||||
|
||||
# Run the benchmark binary
|
||||
cargo bench
|
||||
|
||||
|
||||
# ^^^ TERMINATE YOUR CODE BEFORE THE BOTTOM ARGBASH MARKER ^^^
|
||||
|
||||
# ] <-- needed because of Argbash
|
||||
cargo bench 64 --no-default-features --features=bench
|
||||
cargo bench 32 --no-default-features --features=bench
|
||||
cargo bench 16 --no-default-features --features=bench
|
||||
cargo bench 8 --no-default-features --features=bench
|
||||
cargo bench 4 --no-default-features --features=bench
|
||||
cargo bench 2 --no-default-features --features=bench
|
||||
cargo bench 1 --no-default-features --features=bench
|
||||
Reference in New Issue
Block a user