-
Notifications
You must be signed in to change notification settings - Fork 297
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: Graph methods for circuit analysis (part 1) #7948
Conversation
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.
Please address the comments and resubmit for review
barretenberg/cpp/src/barretenberg/boomerang_value_detection/.gitignore
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/smt_verification/circuit/standard_circuit.test.cpp
Outdated
Show resolved
Hide resolved
@@ -473,6 +473,57 @@ void StandardCircuitBuilder_<FF>::fix_witness(const uint32_t witness_index, cons | |||
++this->num_gates; | |||
} | |||
|
|||
template <typename FF> void StandardCircuitBuilder_<FF>::print_boomerang_variables() |
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.
Please add comment about how this function works
barretenberg/cpp/src/barretenberg/circuit_checker/standard_circuit_builder.test.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph_description.test.cpp
Outdated
Show resolved
Hide resolved
StandardCircuitBuilder circuit_constructor = StandardCircuitBuilder(); | ||
fr a = fr::one(); | ||
circuit_constructor.add_public_variable(a); | ||
Graph graph = Graph(circuit_constructor); |
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.
You are not checking graph structure in any of these tests, so they aren't doing anything. Please add checks of graph structure
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
} | ||
|
||
template <typename FF> | ||
void Graph_<FF>::connect_all_variables_in_vector(const std::vector<uint32_t>& variables_vector, |
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.
Why are you still using zero index if you need to check that it's not a constant variable?
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.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05
.
Benchmark suite | Current: 2744ba4 | Previous: 7f6dba2 | Ratio |
---|---|---|---|
nativeconstruct_proof_ultrahonk_power_of_2/20 |
5168.177880000002 ms/iter |
4750.393791999997 ms/iter |
1.09 |
commit(t) |
4428680062 ns/iter |
3767372954 ns/iter |
1.18 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @ludamad @codygunton
Changes to circuit sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
…es and sha256 were testted
24d4529
to
d9486f2
Compare
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
… some naming changes
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/standard_circuit_builder.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/stdlib/hash/blake2s/blake2s.test.cpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/boomerang_value_detection/graph.cpp
Outdated
Show resolved
Hide resolved
} | ||
|
||
/** | ||
* @brief this method removes false cases in lookup table for a given gate |
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.
yet another false cases
occurrence
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.
LGTM
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.
We'll need to document the tests and functionality more, but let's merge it in for now
* master: (81 commits) feat: Encode static error strings in the ABI (#9552) chore: redo typo PR by donatik27 (#9693) chore: update install instructions for foundry to display version of rust to install (#9653) chore: disable bench upload until #9692 fix: earthly-ci in bench-e2e (#9689) chore: redo typo PR by cypherpepe (#9687) chore: redo typo PR by youyyytrok (#9686) chore: redo typo PR by mdqst (#9685) chore: redo typo PR by mdqst (#9684) feat: adding tags to encrypted logs (#9566) fix: enable gerousia e2e test (#9677) git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg chore: redo typo PR by dsarfed (#9667) fix: bench e2e jobs (#9662) fix: Fix random for Mac users (#9670) feat: Graph methods for circuit analysis (part 1) (#7948) feat: Faster random sampling (#9655) ...
Create graph description for Ultra Circuit Builder.
The original idea was to create to directed graph for arithmetic circuit, that bases on Ultra Arithmetization.
The constructor creates graph based on blocks for ultra: arithmetic, elliptic, delta range and lookup. In the time of this process gate counter for every variable depends on gate. Also was created algorithm for finding connected components using depth first search algorithm.
Tests from ultra_curcuit_builder were being used for testing the prototype.
summary: there's a constructor for creating graph for Ultra Circuit Builder with additional algorithm for analyzing Circuit.