Skip to content

Commit

Permalink
Remove log trace for performance and add Lilith benching script
Browse files Browse the repository at this point in the history
  • Loading branch information
HudsonGraeme committed Feb 15, 2024
1 parent 9929215 commit 206fd29
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/actions/bench/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ runs:
;;
esac
if [ -n "$feature" ]; then
RUST_LOG=trace cargo nextest run --features $feature benchmarking_tests::tests --test-threads 1
cargo nextest run --features $feature benchmarking_tests::tests --test-threads 1
else
RUST_LOG=trace cargo nextest run benchmarking_tests::tests --test-threads 1
cargo nextest run benchmarking_tests::tests --test-threads 1
fi
- name: Process Results
shell: bash
Expand Down
35 changes: 35 additions & 0 deletions run_lilith.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
jobname=$1
cd notebooks/"$jobname" || exit

function run_archon_command {
command_output=$(eval "$1")
job_id=$(echo "$command_output" | grep -o "Recipe scheduled w/ id: [^;]*" | cut -d':' -f2 | tr -d ' ')
archon get --poll-til-done -i "$job_id"
}

if [ -f "calibration.json" ]; then
if ! archon create-artifact -a $jobname -i input.json -m network.onnx -c calibration.json; then
echo "Updating artifact with calibration.json..."
archon update-artifact -a $jobname -i input.json -m network.onnx -c calibration.json --replace
fi
else
if ! archon create-artifact -a $jobname -i input.json -m network.onnx; then
echo "Updating artifact without calibration.json..."
archon update-artifact -a $jobname -i input.json -m network.onnx --replace
fi
fi
run_archon_command "archon job -a $jobname gen-settings"
run_archon_command "archon job -a $jobname calibrate-settings --target=resources"
run_archon_command "archon job -a $jobname get-srs"
run_archon_command "archon job -a $jobname compile-circuit"
run_archon_command "archon job -a $jobname setup"
run_archon_command "archon job -a $jobname gen-witness"

proof_times=()
for i in {1..10}; do
proof_output=$(run_archon_command "archon job -a $jobname prove")
proof_time=$(echo "$proof_output" | grep "proof took")
proof_times+=("$proof_time")
done

echo "Proof times: ${proof_times[@]}"

0 comments on commit 206fd29

Please sign in to comment.