Run Benchmarks on EC2 Runner #1
Workflow file for this run
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
name: Run Benchmarks on EC2 Runner | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
runner_name: | ||
required: true | ||
type: string | ||
instance_type: | ||
required: true | ||
type: string | ||
enable_gpu: | ||
required: true | ||
type: string | ||
provers: | ||
required: false | ||
type: string | ||
default: 'sp1' | ||
programs: | ||
required: false | ||
type: string | ||
default: 'loop,fibonacci,tendermint,reth1,reth2' | ||
filename: | ||
required: false | ||
type: string | ||
default: 'benchmark' | ||
trials: | ||
required: false | ||
type: string | ||
default: '1' | ||
hashfns: | ||
required: false | ||
type: string | ||
default: 'poseidon' | ||
shard_sizes: | ||
required: false | ||
type: string | ||
default: '22' | ||
block_1: | ||
required: false | ||
type: string | ||
default: '17106222' | ||
block_2: | ||
required: false | ||
type: string | ||
default: '19409768' | ||
jobs: | ||
run-benchmark: | ||
runs-on: ${{ inputs.runner_name }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Docker | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Build Docker image | ||
run: | | ||
docker build -t zkvm-perf --platform linux/amd64 -f Dockerfile.gpu . | ||
- name: Run benchmark | ||
run: | | ||
docker run ${{ inputs.enable_gpu == 'true' && '--gpus all' || '' }} --platform linux/amd64 \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-v ${{ github.workspace }}/benchmarks:/usr/src/app/benchmarks \ | ||
-e RUST_BACKTRACE=full \ | ||
--network host \ | ||
zkvm-perf \ | ||
python3 sweep.py \ | ||
--filename ${{ inputs.filename }} \ | ||
--trials ${{ inputs.trials }} \ | ||
--programs ${{ inputs.programs }} \ | ||
--provers ${{ inputs.provers }} \ | ||
--hashfns ${{ inputs.hashfns }} \ | ||
--shard-sizes ${{ inputs.shard_sizes }} \ | ||
--block-1 ${{ inputs.block_1 }} \ | ||
--block-2 ${{ inputs.block_2 }} | ||
- name: Upload benchmark results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: benchmark-results-${{ inputs.instance_type }} | ||
path: ${{ github.workspace }}/benchmarks/*.csv | ||
- name: Print Results | ||
run: | | ||
cat ${{ github.workspace }}/benchmarks/*.csv |