Skip to content

Commit

Permalink
Update benchmark script
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtiomTr committed Jun 5, 2024
1 parent 22351ba commit 0c018fb
Showing 1 changed file with 35 additions and 10 deletions.
45 changes: 35 additions & 10 deletions run-cuda-benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ SECONDS=0
paste_name="linode_benchmarks"
paste_file="$paste_name.txt"

print_cores_msg () {
printf "\n\n\n********** %s **********\n\n\n" "$1" >> "$2"
}

print_msg () {
printf "\n\n\n~~~~~~~~~~ %s ~~~~~~~~~~\n\n\n" "$1" >> "$2"
}
Expand All @@ -44,34 +48,55 @@ git clone https://github.com/ArtiomTr/rust-kzg.git
cd rust-kzg || exit
git checkout Integrate_sppark_msm || exit

print_cores_msg "BENCH EIP"

# 3. run benchmarks
print_msg "rust-kzg with blst backend (parallel, bgmw)" ../"$paste_file"
cargo bench --manifest-path blst/Cargo.toml --bench eip_4844 --no-default-features --features std,rand,parallel,bgmw >> ../"$paste_file"
cargo bench --manifest-path blst/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel,bgmw >> ../"$paste_file"

print_msg "rust-kzg with blst backend (sppark)" ../"$paste_file"
cargo bench --manifest-path blst/Cargo.toml --bench eip_4844 --no-default-features --features std,rand,parallel,sppark >> ../"$paste_file"
cargo bench --manifest-path blst/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel,sppark >> ../"$paste_file"

print_msg "rust-kzg with arkworks backend (parallel, bgmw)" ../"$paste_file"
cargo bench --manifest-path arkworks/Cargo.toml --bench eip_4844 --no-default-features --features std,rand,parallel,bgmw >> ../"$paste_file"
cargo bench --manifest-path arkworks/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel,bgmw

print_msg "rust-kzg with arkworks3 backend (parallel, bgmw)" ../"$paste_file"
print_msg "rust-kzg with arkworks3 backend (parallel)" ../"$paste_file"
cargo bench --manifest-path arkworks3/Cargo.toml --bench eip_4844 --no-default-features --features std,rand,parallel >> ../"$paste_file"
cargo bench --manifest-path arkworks3/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel >> ../"$paste_file"

print_msg "rust-kzg with arkworks3 backend (sppark)" ../"$paste_file"
cargo bench --manifest-path arkworks3/Cargo.toml --bench eip_4844 --no-default-features --features std,rand,parallel,sppark >> ../"$paste_file"
cargo bench --manifest-path arkworks3/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel,sppark >> ../"$paste_file"

print_msg "rust-kzg with arkworks3 backend (sppark_wlc)" ../"$paste_file"
cargo bench --manifest-path arkworks3/Cargo.toml --bench eip_4844 --no-default-features --features std,rand,parallel,sppark_wlc >> ../"$paste_file"
cargo bench --manifest-path arkworks3/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel,sppark_wlc >> ../"$paste_file"

print_msg "rust-kzg with constantine backend (parallel, bgmw)" ../"$paste_file"
cargo bench --manifest-path constantine/Cargo.toml --bench eip_4844 --no-default-features --features std,rand,parallel,bgmw >> ../"$paste_file"
cargo bench --manifest-path constantine/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel,bgmw >> ../"$paste_file"
point_count=("12" "14" "16" "18" "20")
jobs_count=${#point_count[@]}

for (( i=0; i<jobs_count; i++ ));
do
print_cores_msg "BENCHMARKING 2^${point_count[$i]} POINTS" "$paste_file"

export BENCH_NPOW=point_count[$i]

print_msg "rust-kzg with blst backend (parallel, bgmw)" ../"$paste_file"
cargo bench --manifest-path blst/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel,bgmw >> ../"$paste_file"

print_msg "rust-kzg with blst backend (sppark)" ../"$paste_file"
cargo bench --manifest-path blst/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel,sppark >> ../"$paste_file"

print_msg "rust-kzg with arkworks backend (parallel, bgmw)" ../"$paste_file"
cargo bench --manifest-path arkworks/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel,bgmw >> ../"$paste_file"

print_msg "rust-kzg with arkworks3 backend (parallel)" ../"$paste_file"
cargo bench --manifest-path arkworks3/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel >> ../"$paste_file"

print_msg "rust-kzg with arkworks3 backend (sppark)" ../"$paste_file"
cargo bench --manifest-path arkworks3/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel,sppark >> ../"$paste_file"

print_msg "rust-kzg with arkworks3 backend (sppark_wlc)" ../"$paste_file"
cargo bench --manifest-path arkworks3/Cargo.toml --bench lincomb --no-default-features --features std,rand,parallel,sppark_wlc >> ../"$paste_file"

done

cd ..

Expand Down

0 comments on commit 0c018fb

Please sign in to comment.