Skip to content
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: measure plonk rounds #3065

Merged
merged 64 commits into from
Oct 27, 2023
Merged
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
9c3045b
Tinkering
ludamad0 Oct 20, 2023
6915582
mesing
ludamad0 Oct 20, 2023
bc2981b
add parallel_for_batched
ludamad0 Oct 20, 2023
887b346
tinkering
ludamad0 Oct 20, 2023
889dc1f
Zero morph cleanup
ludamad0 Oct 20, 2023
e930a31
batch 1 loop
ludamad0 Oct 20, 2023
fbd0ef4
batch 1 loop
ludamad0 Oct 20, 2023
6f1a26d
Update
ludamad0 Oct 20, 2023
68f7bd2
Benchmark zeromorph
ludamad0 Oct 20, 2023
bedd0b3
Benchmark zeromorph
ludamad0 Oct 20, 2023
cc32991
Benchmark zeromorph
ludamad0 Oct 20, 2023
f7375cf
Benchmark zeromorph
ludamad0 Oct 20, 2023
1c222d6
stash
ludamad0 Oct 20, 2023
dc72e3f
stash
ludamad0 Oct 20, 2023
26ef756
stash
ludamad0 Oct 20, 2023
e37b673
Get compiling again
ludamad0 Oct 20, 2023
42cadb4
Merge remote-tracking branch 'origin/master' into feat/more-profiling
ludamad0 Oct 23, 2023
b8840d7
Surprising results
ludamad0 Oct 23, 2023
5bdc5da
Surprising results
ludamad0 Oct 23, 2023
a740a24
Undo
ludamad0 Oct 23, 2023
2fbe761
Simplify batched parallel_for
ludamad0 Oct 23, 2023
95ab25a
chore: cleanup old profiling entrypoint, default to honk_passes
ludamad0 Oct 23, 2023
3b801a3
Merge branch 'master' into feat/more-profiling
ludamad Oct 23, 2023
cf19371
Fix profile script
ludamad0 Oct 23, 2023
1e65db3
Force fast passes to be one iteration
ludamad0 Oct 23, 2023
5e02316
Merge remote-tracking branch 'origin/feat/more-profiling' into feat/m…
ludamad0 Oct 23, 2023
799203d
Lighter weight stuffs
ludamad0 Oct 23, 2023
cd42d16
review feedback
ludamad0 Oct 23, 2023
4040fb8
ultra plonk benching
ludamad0 Oct 23, 2023
d7d775b
ultra plonk benching
ludamad0 Oct 23, 2023
1064500
ultra plonk benching
ludamad0 Oct 23, 2023
33de474
stash
ludamad0 Oct 24, 2023
53c893b
Try update in form
ludamad0 Oct 24, 2023
abb435c
ultra plonk benching
ludamad0 Oct 24, 2023
d4dd318
ultra plonk benching
ludamad0 Oct 24, 2023
776cbdf
Measuring?
ludamad0 Oct 24, 2023
cb94d87
Update
ludamad0 Oct 25, 2023
0c0972a
bring back main simple
ludamad0 Oct 25, 2023
f6f26c2
bring back main simple
ludamad0 Oct 25, 2023
a417357
bring back main simple
ludamad0 Oct 25, 2023
1830fe3
Reverts
ludamad0 Oct 26, 2023
fe3838c
Reverts
ludamad0 Oct 26, 2023
9f4c530
Merge remote-tracking branch 'origin/master' into ad/feat/measure_plo…
ludamad0 Oct 26, 2023
0cc6bde
Reverts
ludamad0 Oct 26, 2023
6bf68c3
Reverts
ludamad0 Oct 26, 2023
591e817
Merge branch 'master' into ad/feat/measure_plonk_rounds
ludamad Oct 26, 2023
592738b
feat: power of 2 circuit test
ludamad0 Oct 26, 2023
527d0d0
feat: power of 2 bench functions
ludamad0 Oct 26, 2023
85f7200
Merge remote-tracking branch 'origin/ad/feat/measure_plonk_rounds' in…
ludamad0 Oct 26, 2023
bc6401d
feat: benchmarks.sh
ludamad0 Oct 26, 2023
812e897
chore: benchmark alignment
ludamad0 Oct 26, 2023
99670ec
chore: simplification
ludamad0 Oct 26, 2023
bdacc65
Time to be bold
ludamad Oct 26, 2023
a7a77a2
Try update
ludamad0 Oct 26, 2023
fd1c368
Merge https://github.com/AztecProtocol/aztec3-packages into ad/feat/m…
ludamad Oct 26, 2023
c870b73
Merge branch 'ad/feat/measure_plonk_rounds' of https://github.com/Azt…
ludamad Oct 26, 2023
cb51790
fix: benchmarks.sh
ludamad Oct 26, 2023
ff29f0d
chore: clarify
ludamad0 Oct 26, 2023
f24fe81
chore: simplify
ludamad0 Oct 26, 2023
5de8fda
Update ultra_honk_rounds.bench.cpp
ludamad Oct 27, 2023
c9a7d61
Update benchmarks.sh
ludamad Oct 27, 2023
097541b
Merge remote-tracking branch 'origin/master' into ad/feat/measure_plo…
codygunton Oct 27, 2023
0c7482b
Update ultra_honk_rounds.bench.cpp
ludamad Oct 27, 2023
796a708
Update ultra_plonk_rounds.bench.cpp
ludamad Oct 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
batch 1 loop
ludamad0 committed Oct 20, 2023
commit e930a31ca35d3901b1deb09f5d9cf8c55cd3980b
13 changes: 7 additions & 6 deletions barretenberg/cpp/src/barretenberg/polynomials/polynomial.cpp
Original file line number Diff line number Diff line change
@@ -445,30 +445,31 @@ template <typename Fr> Polynomial<Fr> Polynomial<Fr>::partial_evaluate_mle(std::
size_t n_l = 1 << (n - 1);

// Temporary buffer of half the size of the polynomial
Polynomial<Fr> tmp(n_l, DontZeroMemory::FLAG);
Polynomial<Fr> intermediate(n_l, DontZeroMemory::FLAG);

Fr* prev = coefficients_.get();

// Evaluate variable X_{n-1} at u_{m-1}
Fr u_l = evaluation_points[m - 1];

for (size_t i = 0; i < n_l; ++i) {
tmp[i] = prev[i] + u_l * (prev[i + n_l] - prev[i]);
}
parallel_for_batched(n_l, [&](size_t i) {
// Initiate our intermediate results
intermediate[i] = prev[i] + u_l * (prev[i + n_l] - prev[i]);
});
// Evaluate m-1 variables X_{n-l-1}, ..., X_{n-2} at m-1 remaining values u_0,...,u_{m-2})
for (size_t l = 1; l < m; ++l) {
size_t new_n_l = 1 << (n - l - 1);
u_l = evaluation_points[m - l - 1];
for (size_t i = 0; i < new_n_l; ++i) {
tmp[i] = tmp[i] + u_l * (tmp[i + new_n_l] - tmp[i]);
intermediate[i] += u_l * (intermediate[i + new_n_l] - intermediate[i]);
}
}

size_t final_n_l = 1 << (n - m);
// Construct resulting polynomial g(X_0,…,X_{n-m-1})) = p(X_0,…,X_{n-m-1},u_0,...u_{m-1}) from buffer
Polynomial<Fr> result(final_n_l, DontZeroMemory::FLAG);
for (size_t idx = 0; idx < final_n_l; ++idx) {
result[idx] = tmp[idx];
result[idx] = intermediate[idx];
}

return result;