-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 04-05-feat_avm_enable_contract_testing_wit…
…h_bb_binary
- Loading branch information
Showing
317 changed files
with
5,179 additions
and
4,123 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
".": "0.32.1", | ||
"yarn-project/cli": "0.32.1", | ||
"yarn-project/aztec": "0.32.1", | ||
"barretenberg": "0.32.1", | ||
"barretenberg/ts": "0.32.1" | ||
".": "0.33.0", | ||
"yarn-project/cli": "0.33.0", | ||
"yarn-project/aztec": "0.33.0", | ||
"barretenberg": "0.33.0", | ||
"barretenberg/ts": "0.33.0" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import json | ||
from pathlib import Path | ||
|
||
PREFIX = Path("build-op-count-time") | ||
PROTOGALAXY_BENCH_JSON = Path("protogalaxy_bench.json") | ||
BENCHMARK = "fold_k<GoblinUltraFlavor, 3>/16" | ||
|
||
# Single out an independent set of functions accounting for most of BENCHMARK's real_time | ||
to_keep = [ | ||
"ProtogalaxyProver::fold_instances(t)", | ||
] | ||
with open(PREFIX/PROTOGALAXY_BENCH_JSON, "r") as read_file: | ||
read_result = json.load(read_file) | ||
for _bench in read_result["benchmarks"]: | ||
print(_bench) | ||
if _bench["name"] == BENCHMARK: | ||
bench = _bench | ||
bench_components = dict(filter(lambda x: x[0] in to_keep, bench.items())) | ||
|
||
# For each kept time, get the proportion over all kept times. | ||
sum_of_kept_times_ms = sum(float(time) | ||
for _, time in bench_components.items())/1e6 | ||
max_label_length = max(len(label) for label in to_keep) | ||
column = {"function": "function", "ms": "ms", "%": "% sum"} | ||
print( | ||
f"{column['function']:<{max_label_length}}{column['ms']:>8} {column['%']:>8}") | ||
for key in to_keep: | ||
time_ms = bench[key]/1e6 | ||
print(f"{key:<{max_label_length}}{time_ms:>8.0f} {time_ms/sum_of_kept_times_ms:>8.2%}") | ||
|
||
# Validate that kept times account for most of the total measured time. | ||
total_time_ms = bench["real_time"] | ||
totals = '\nTotal time accounted for: {:.0f}ms/{:.0f}ms = {:.2%}' | ||
totals = totals.format( | ||
sum_of_kept_times_ms, total_time_ms, sum_of_kept_times_ms/total_time_ms) | ||
print(totals) | ||
|
||
print("\nMajor contributors:") | ||
print( | ||
f"{column['function']:<{max_label_length}}{column['ms']:>8} {column['%']:>7}") | ||
for key in ['commit(t)', 'compute_combiner(t)', 'compute_perturbator(t)', 'compute_univariate(t)']: | ||
if key not in bench: | ||
time_ms = 0 | ||
else: | ||
time_ms = bench[key]/1e6 | ||
print(f"{key:<{max_label_length}}{time_ms:>8.0f} {time_ms/sum_of_kept_times_ms:>8.2%}") | ||
|
||
print('\nBreakdown of ProtogalaxyProver::fold_instances:') | ||
protogalaxy_round_labels = [ | ||
"ProtoGalaxyProver_::preparation_round(t)", | ||
"ProtoGalaxyProver_::perturbator_round(t)", | ||
"ProtoGalaxyProver_::combiner_quotient_round(t)", | ||
"ProtoGalaxyProver_::accumulator_update_round(t)" | ||
] | ||
max_label_length = max(len(label) for label in protogalaxy_round_labels) | ||
for key in protogalaxy_round_labels: | ||
time_ms = bench[key]/1e6 | ||
total_time_ms = bench["ProtogalaxyProver::fold_instances(t)"]/1e6 | ||
print(f"{key:<{max_label_length}}{time_ms:>8.0f} {time_ms/total_time_ms:>8.2%}") | ||
|
||
|
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,25 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
TARGET="protogalaxy_bench" | ||
FILTER="/16$" | ||
BUILD_DIR=build-op-count-time | ||
|
||
# Move above script dir. | ||
cd $(dirname $0)/.. | ||
|
||
# Measure the benchmarks with ops time counting | ||
./scripts/benchmark_remote.sh protogalaxy_bench\ | ||
"./protogalaxy_bench --benchmark_filter=$FILTER\ | ||
--benchmark_out=$TARGET.json\ | ||
--benchmark_out_format=json"\ | ||
op-count-time\ | ||
build-op-count-time | ||
|
||
# Retrieve output from benching instance | ||
cd $BUILD_DIR | ||
scp $BB_SSH_KEY $BB_SSH_INSTANCE:$BB_SSH_CPP_PATH/build/$TARGET.json . | ||
|
||
# Analyze the results | ||
cd ../ | ||
python3 ./scripts/analyze_protogalaxy_bench.py |
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
Oops, something went wrong.