Skip to content

Conversation

@SouchonTheo
Copy link
Contributor

@SouchonTheo SouchonTheo commented Jan 7, 2026

This pull request refactors and streamlines the benchmarking code for the high-level API in tfhe-benchmark, making it more modular and easier to extend. The main change is the introduction of macros to generate and run benchmarks for various operations and types, replacing repetitive code with a more maintainable approach.

Benchmarking code refactor and automation:

  • Introduced the bench_fhe_type_op function and supporting BenchWait trait to generalize benchmarking over arbitrary operations, enabling the same code to handle all binary operations and their result types.
  • Added the bench_type_op! and generate_typed_benches! macros to automatically generate benchmark functions for each operation (add, sub, mul, bitwise, shift, rotate, min/max, etc.) and FHE integer type, replacing the previous manual approach.
  • Added the run_benches! macro to succinctly invoke all generated benchmarks for a given set of types, further reducing boilerplate and improving maintainability.
  • Updated the main function to use the new run_benches! macro, ensuring all benchmarks are executed for the relevant types depending on the configuration.

Repository hygiene:

  • Updated .gitignore to exclude the benchmarks_parameters directory, preventing benchmark parameter files from being checked into version control.

This change is Reviewable

@SouchonTheo SouchonTheo requested a review from soonum as a code owner January 7, 2026 13:31
@cla-bot
Copy link

cla-bot bot commented Jan 7, 2026

Thank you for your pull request. We require contributors to sign our Contributor License Agreement / Terms and Conditions, and we don't seem to have the users @SouchonTheo on file. In order for us to review and merge your code, please sign:

  • For individual contribution: our CLA
  • for Bounty submission, if you are an individual: our T&C
  • for Bounty submission, if you are a company: our T&C
    to get yourself added.

If you already signed one of this document, just wait to be added to the bot config.

@SouchonTheo SouchonTheo force-pushed the Moving-integer-bench-to-HLApi branch from 03b980f to ffbe767 Compare January 7, 2026 13:39
@cla-bot
Copy link

cla-bot bot commented Jan 7, 2026

Thank you for your pull request. We require contributors to sign our Contributor License Agreement / Terms and Conditions, and we don't seem to have the users @SouchonTheo on file. In order for us to review and merge your code, please sign:

  • For individual contribution: our CLA
  • for Bounty submission, if you are an individual: our T&C
  • for Bounty submission, if you are a company: our T&C
    to get yourself added.

If you already signed one of this document, just wait to be added to the bot config.

@SouchonTheo SouchonTheo force-pushed the Moving-integer-bench-to-HLApi branch from ffbe767 to dafe45d Compare January 7, 2026 13:48
@cla-bot
Copy link

cla-bot bot commented Jan 7, 2026

Thank you for your pull request. We require contributors to sign our Contributor License Agreement / Terms and Conditions, and we don't seem to have the users @SouchonTheo on file. In order for us to review and merge your code, please sign:

  • For individual contribution: our CLA
  • for Bounty submission, if you are an individual: our T&C
  • for Bounty submission, if you are a company: our T&C
    to get yourself added.

If you already signed one of this document, just wait to be added to the bot config.

@IceTDrinker
Copy link
Member

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Jan 7, 2026
@cla-bot
Copy link

cla-bot bot commented Jan 7, 2026

The cla-bot has been summoned, and re-checked this pull request!

**/*.rmeta
**/Cargo.lock
**/*.bin
**/.DS_Store
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use a .gitignore global for your macOS, this is fine to keep :)

@SouchonTheo SouchonTheo force-pushed the Moving-integer-bench-to-HLApi branch from dafe45d to 785a588 Compare January 8, 2026 15:16
Copy link
Contributor

@soonum soonum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, thanks.

@soonum reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @IceTDrinker and @SouchonTheo).

@SouchonTheo SouchonTheo merged commit 51735fb into main Jan 9, 2026
182 of 184 checks passed
@SouchonTheo SouchonTheo deleted the Moving-integer-bench-to-HLApi branch January 9, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants