-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: bench bb in pr's, docker shell utils #3561
Merged
Merged
Changes from 57 commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
938066e
feat: bench bb in pr's
ludamad0 e019f68
fix: core count first
ludamad0 a079fe8
fix: core count first
ludamad0 00abec4
fix script run
ludamad0 24bc448
Bench
ludamad0 50629e3
fix: change to /bin/bash
ludamad0 7cb52d4
fix: change to /bin/bash
ludamad0 1090a98
meh.
ludamad0 3fdbd14
Janky attempts
ludamad0 bcfaecc
Janky attempts
ludamad0 a263c0a
Janky attempts
ludamad0 a8d5e21
Add script for ultra_honk_bench.sh
ludamad0 b47c911
executable flag
ludamad0 791a492
reqs
ludamad0 df03cd2
fix: include scripts/ci in ci build
ludamad0 94fefdc
reqs
ludamad0 643696c
Build ultra honk in linux clang
ludamad0 0a4f491
Update
ludamad0 0f2e89a
fix path
ludamad0 2792b63
fix reqs
ludamad0 b0b4c8c
Build grumpkin srs gen in linux clang
ludamad0 8f25213
Try a simple benchmark
ludamad0 1a16e10
temporary simple docker sanity test
ludamad0 4f653d3
temporary simple docker sanity test
ludamad0 2a31a93
timing
ludamad0 9aec742
Merge github.com:AztecProtocol/aztec-packages into feat/bench-bb-in-prs
ludamad0 9758fa6
Merge github.com:AztecProtocol/aztec-packages into feat/bench-bb-in-prs
ludamad0 0bc1011
Temp instrumenting
ludamad0 bd3be20
Merge branch 'master' into feat/bench-bb-in-prs
ludamad 70be4ab
Merge branch 'master' into feat/bench-bb-in-prs
ludamad 9db75ae
get_all work
ludamad0 636cb77
Merge remote-tracking branch 'origin/master' into feat/bench-bb-in-prs
ludamad0 8b7b4ae
Docker interactive
ludamad0 345979f
Merge branch 'master' into feat/bench-bb-in-prs
ludamad b394a25
chore: reverts
ludamad0 13794f8
Merge remote-tracking branch 'origin/master' into feat/bench-bb-in-prs
ludamad0 817aa13
Benchmark progress
ludamad0 de8907f
Merge branch 'feat/bench-bb-in-prs' of github.com:AztecProtocol/aztec…
ludamad0 3e511e6
fix docs deploy
ludamad0 4b5e707
Revert partial changes to barretenberg/cpp/dockerfiles/Dockerfile.x86…
ludamad0 9eae745
Revert
ludamad0 9f28f18
Merge branch 'master' into feat/bench-bb-in-prs
ludamad 7f1ef07
diff
ludamad0 7472c30
Merge remote-tracking branch 'origin/feat/bench-bb-in-prs' into feat/…
ludamad0 45b7fb7
Copy ci scripts into docker container
ludamad0 e47075c
Need curl
ludamad0 af6526b
copy grumpkin srs gen
ludamad0 e0eb0f0
Expose binaries properly
ludamad0 5736db5
Expose jq
ludamad0 a30d3eb
Benchmark shebang fix?
ludamad0 24df8e0
Tinkering, stinkering
ludamad0 9bc28fc
fix: script path [ci debug]
ludamad0 addf73d
fix: benchmark-docs uploading
ludamad0 9d0dc7e
Merge github.com:AztecProtocol/aztec-packages into feat/bench-bb-in-prs
ludamad0 8d75cb6
Try different image [ci debug]
ludamad0 14b7eef
Try different image [ci debug]
ludamad0 9df4e63
Merge branch 'master' into feat/bench-bb-in-prs
ludamad 5d14416
Update config.yml
ludamad 188984b
[ci rebuild barretenberg-bench]
ludamad0 831c934
Merge remote-tracking branch 'origin/master' into feat/bench-bb-in-prs
ludamad0 72ee001
Merge remote-tracking branch 'origin/feat/bench-bb-in-prs' into feat/…
ludamad0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,4 @@ | ||
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clang | ||
WORKDIR /usr/src/barretenberg/cpp | ||
RUN apk update && apk add curl libstdc++ jq | ||
RUN ./scripts/ci/ultra_honk_bench.sh |
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
20 changes: 20 additions & 0 deletions
20
barretenberg/cpp/dockerfiles/interactive/Dockerfile.alpine
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,20 @@ | ||
# Use Alpine 3.18 as the base image | ||
FROM alpine:3.18 | ||
|
||
# Install necessary packages | ||
RUN apk update && apk add \ | ||
bash \ | ||
build-base \ | ||
clang16 \ | ||
cmake \ | ||
ninja \ | ||
git \ | ||
curl \ | ||
perl \ | ||
libstdc++ | ||
|
||
# Set the working directory in the container | ||
WORKDIR /usr/src/barretenberg/cpp | ||
|
||
# Set bash as the default command to keep the container running interactively | ||
CMD ["/bin/bash"] |
24 changes: 24 additions & 0 deletions
24
barretenberg/cpp/dockerfiles/interactive/Dockerfile.ubuntu
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,24 @@ | ||
FROM ubuntu:lunar | ||
|
||
RUN apt update && apt install -y \ | ||
build-essential \ | ||
curl \ | ||
git \ | ||
cmake \ | ||
lsb-release \ | ||
wget \ | ||
software-properties-common \ | ||
gnupg \ | ||
ninja-build \ | ||
npm \ | ||
\ | ||
libssl-dev \ | ||
jq \ | ||
bash \ | ||
libstdc++6 | ||
|
||
WORKDIR /usr/src/barretenberg/cpp | ||
|
||
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 16 | ||
|
||
CMD ["/bin/bash"] |
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,14 @@ | ||
#!/usr/bin/env sh | ||
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace | ||
set -eu | ||
|
||
# enter script folder | ||
cd "$(dirname $0)" | ||
cd ../../srs_db | ||
./download_ignition.sh 1 | ||
./download_grumpkin.sh | ||
cd ../build | ||
./bin/ultra_honk_rounds_bench --benchmark_format=json | tee ultra_honk_rounds_bench.json | ||
echo "Testing if we have created valid JSON." | ||
cat ultra_honk_rounds_bench.json | jq empty | ||
echo "JSON is valid. Continuing." |
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,19 @@ | ||
# Uploads to S3 a recent barretenberg benchmark run. | ||
#!/usr/bin/env bash | ||
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace | ||
set -eu | ||
|
||
extract_repo barretenberg-bench /usr/src extracted-repo | ||
|
||
BUCKET_NAME="aztec-ci-artifacts" | ||
COMMIT_HASH="${COMMIT_HASH:-$(git rev-parse HEAD)}" | ||
|
||
if [ "${BRANCH:-}" = "master" ]; then | ||
TARGET_FOLDER="barretenberg-bench-v1/master/$COMMIT_HASH/" | ||
elif [ -n "${PULL_REQUEST:-}" ]; then | ||
TARGET_FOLDER="barretenberg-bench-v1/pulls/${PULL_REQUEST##*/}" | ||
else | ||
echo Skipping upload since no target folder was defined | ||
fi | ||
echo "Uploading to s3://$BUCKET_NAME/$TARGET_FOLDER" | ||
aws s3 cp extracted-repo/src/barretenberg/cpp/build/ultra_honk_rounds_bench.json "s3://$BUCKET_NAME/$TARGET_FOLDER/ultra_honk_rounds_bench.json" |
File renamed without changes.
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,16 @@ | ||
# Script to enter a docker shell. | ||
# This comes in two flavors, ubuntu and alpine. | ||
# This mounts the current folder into the image, allowing for in-docker development. | ||
# You then need to run cmake commands fresh to build. | ||
# Ideally you can combine with a fresh clone of the repo to keep it persistently around, or move around build dirs as needed. | ||
# This is useful for debugging issues like bb being slow on alpine or running into errors on a specific version of gcc. | ||
# usage: ./docker_interactive.sh ubuntu or ./docker_interactive.sh alpine | ||
|
||
# Enter script directory. | ||
set -eu | ||
cd $(dirname $0) | ||
# allows for 'alpine' or 'ubuntu' | ||
ENVIRONMENT_KIND="${1:-alpine}" | ||
DOCKERFILE="../dockerfiles/interactive/Dockerfile.$ENVIRONMENT_KIND" | ||
docker build -t "env-$ENVIRONMENT_KIND" -f "$DOCKERFILE" . | ||
docker run -it --mount type=bind,source=$(pwd)/..,target=/usr/src/barretenberg/cpp "env-$ENVIRONMENT_KIND" |
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 |
---|---|---|
|
@@ -3,6 +3,10 @@ | |
#include "barretenberg/ecc/scalar_multiplication/scalar_multiplication.hpp" | ||
#include "barretenberg/polynomials/polynomial_arithmetic.hpp" | ||
#include "barretenberg/srs/factories/file_crs_factory.hpp" | ||
|
||
#include "barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp" | ||
#include "barretenberg/ultra_honk/ultra_composer.hpp" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This hasn't ran in a long time, fixes |
||
|
||
#include <chrono> | ||
#include <cstdlib> | ||
|
||
|
@@ -42,8 +46,6 @@ constexpr size_t NUM_POINTS = 1 << 16; | |
std::vector<fr> scalars; | ||
static barretenberg::evaluation_domain small_domain; | ||
static barretenberg::evaluation_domain large_domain; | ||
auto reference_string = | ||
std::make_shared<barretenberg::srs::factories::FileProverCrs<curve::BN254>>(NUM_POINTS, "../srs_db/ignition"); | ||
|
||
const auto init = []() { | ||
small_domain = barretenberg::evaluation_domain(NUM_POINTS); | ||
|
@@ -63,6 +65,9 @@ const auto init = []() { | |
}; | ||
// constexpr double add_to_mixed_add_complexity = 1.36; | ||
|
||
auto reference_string = | ||
std::make_shared<barretenberg::srs::factories::FileProverCrs<curve::BN254>>(NUM_POINTS, "../srs_db/ignition"); | ||
|
||
int pippenger() | ||
{ | ||
scalar_multiplication::pippenger_runtime_state<curve::BN254> state(NUM_POINTS); | ||
|
@@ -98,6 +103,7 @@ int coset_fft_regular() | |
|
||
int main() | ||
{ | ||
barretenberg::srs::init_crs_factory("../srs_db/ignition"); | ||
std::cout << "initializing" << std::endl; | ||
init(); | ||
std::cout << "executing normal fft" << std::endl; | ||
|
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just trying to keep a pattern here with ci helper scripts in scripts/ci