-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "fix: "feat: Changing finite field arithmetic in wasm to 29 bi…
- Loading branch information
Showing
37 changed files
with
1,813 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
# This script automates the process of benchmarking WASM on a remote EC2 instance. | ||
# Prerequisites: | ||
# 1. Define the following environment variables: | ||
# - BB_SSH_KEY: SSH key for EC2 instance, e.g., '-i key.pem' | ||
# - BB_SSH_INSTANCE: EC2 instance URL | ||
# - BB_SSH_CPP_PATH: Path to barretenberg/cpp in a cloned repository on the EC2 instance | ||
set -eu | ||
|
||
BENCHMARK=${1:-goblin_bench} | ||
COMMAND=${2:-./$BENCHMARK} | ||
HARDWARE_CONCURRENCY=${HARDWARE_CONCURRENCY:-16} | ||
|
||
# Move above script dir. | ||
cd $(dirname $0)/.. | ||
|
||
# Configure and build. | ||
cmake --preset wasm-threads | ||
cmake --build --preset wasm-threads --parallel --target $BENCHMARK | ||
|
||
source scripts/_benchmark_remote_lock.sh | ||
|
||
cd build-wasm-threads | ||
# ensure folder structure | ||
ssh $BB_SSH_KEY $BB_SSH_INSTANCE "mkdir -p $BB_SSH_CPP_PATH/build-wasm-threads" | ||
# copy build wasm threads | ||
scp $BB_SSH_KEY ./bin/$BENCHMARK $BB_SSH_INSTANCE:$BB_SSH_CPP_PATH/build-wasm-threads | ||
# run wasm benchmarking | ||
ssh $BB_SSH_KEY $BB_SSH_INSTANCE \ | ||
"cd $BB_SSH_CPP_PATH/build-wasm-threads ; /home/ubuntu/.wasmer/bin/wasmer run --dir=$BB_SSH_CPP_PATH --enable-threads --env HARDWARE_CONCURRENCY=$HARDWARE_CONCURRENCY $COMMAND" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.