Skip to content

Run Benchmarks on EC2 Runner #1

Run Benchmarks on EC2 Runner

Run Benchmarks on EC2 Runner #1

Workflow file for this run

name: Run Benchmarks on EC2 Runner

Check failure on line 1 in .github/workflows/run-on-runner.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/run-on-runner.yml

Invalid workflow file

you may only define up to 10 `inputs` for a `workflow_dispatch` event
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