Skip to content

Commit

Permalink
Lighter weight stuffs
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad0 committed Oct 23, 2023
1 parent 5e02316 commit 799203d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 23 deletions.
6 changes: 3 additions & 3 deletions barretenberg/cpp/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@
"generator": "Unix Makefiles",
"inherits": "clang16",
"environment": {
"CFLAGS": "-fxray-instrument -fxray-instruction-threshold=100",
"CXXFLAGS": "-fxray-instrument -fxray-instruction-threshold=100",
"LDFLAGS": "-fxray-instrument -fxray-instruction-threshold=100"
"CFLAGS": "-fxray-instrument",
"CXXFLAGS": "-fxray-instrument -fxray-instruction-threshold=500",
"LDFLAGS": "-fxray-instrument -fxray-instruction-threshold=500"
},
"binaryDir": "build-xray"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ using namespace proof_system;

enum { PREAMBLE, WIRE_COMMITMENTS, SORTED_LIST_ACCUMULATOR, GRAND_PRODUCT_COMPUTATION, RELATION_CHECK, ZEROMORPH };

BBERG_INSTRUMENT BBERG_NOINLINE static void test_pass_inner(State& state,
honk::UltraProver& prover,
size_t index) noexcept
BBERG_PROFILE static void test_pass_inner(State& state, honk::UltraProver& prover, size_t index) noexcept
{

auto time_if_index = [&](size_t target_index, auto&& func) -> void {
Expand All @@ -35,13 +33,13 @@ BBERG_INSTRUMENT BBERG_NOINLINE static void test_pass_inner(State& state,
state.ResumeTiming();
}
}
BBERG_INSTRUMENT BBERG_NOINLINE static void test_pass(State& state, size_t index) noexcept
BBERG_PROFILE static void test_pass(State& state, size_t index) noexcept
{
barretenberg::srs::init_crs_factory("../srs_db/ignition");

honk::UltraComposer composer;
honk::UltraProver prover =
bench_utils::get_prover(composer, &bench_utils::generate_keccak_test_circuit<UltraCircuitBuilder>, 1);
honk::UltraProver prover = bench_utils::get_prover(
composer, &bench_utils::generate_ecdsa_verification_test_circuit<UltraCircuitBuilder>, 10);
test_pass_inner(state, prover, index);
}
#define PASS_BENCHMARK(pass) \
Expand Down
12 changes: 4 additions & 8 deletions barretenberg/cpp/src/barretenberg/common/compiler_hints.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@
#define BBERG_INLINE __attribute__((always_inline)) inline
#endif

// TODO(AD): Other compilers
#if defined(__clang__)
#define BBERG_INSTRUMENT [[clang::xray_always_instrument]]
#define BBERG_NO_INSTRUMENT [[clang::xray_never_instrument]]
#define BBERG_NOINLINE [[clang::noinline]]
// TODO(AD): Other instrumentation?
#ifdef XRAY
#define BBERG_PROFILE [[clang::xray_always_instrument]] [[clang::noinline]]
#else
#define BBERG_INSTRUMENT
#define BBERG_NO_INSTRUMENT
#define BBERG_NOINLINE
#define BBERG_PROFILE
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ template <UltraFlavor Flavor> class UltraProver_ {

public:
explicit UltraProver_(std::shared_ptr<Instance>);
void execute_preamble_round();
void execute_wire_commitments_round();
void execute_sorted_list_accumulator_round();
void execute_grand_product_computation_round();
void execute_relation_check_rounds();
void execute_zeromorph_rounds();
BBERG_PROFILE void execute_preamble_round();
BBERG_PROFILE void execute_wire_commitments_round();
BBERG_PROFILE void execute_sorted_list_accumulator_round();
BBERG_PROFILE void execute_grand_product_computation_round();
BBERG_PROFILE void execute_relation_check_rounds();
BBERG_PROFILE void execute_zeromorph_rounds();

plonk::proof& export_proof();
plonk::proof& construct_proof();
Expand Down

0 comments on commit 799203d

Please sign in to comment.