-
Notifications
You must be signed in to change notification settings - Fork 166
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
chore(bench): implement throughput benchmarks on core_crypto layer #2183
base: main
Are you sure you want to change the base?
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.
Looks good to me except for the comment I left earlier, and I think we can keep only one workflow for GPU benchmarks for integer+core, wdyt?
94a2343
to
5b0c7ed
Compare
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.
Thanks a lot @soonum! In the end you kept cuda_local_streams
and cuda_local_streams_core
then?
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.
@soonum the PR is quite big tell me which part you wanted me to look at in particular that you mentionned
Reviewed 10 of 14 files at r1, all commit messages.
Reviewable status: 10 of 14 files reviewed, 7 unresolved discussions (waiting on @agnesLeroy and @soonum)
tfhe/benches/integer/signed_bench.rs
line 3071 at r1 (raw file):
fn main() { init_bench_type();
can even be a get_bench_type that populates the once lock on demand
tfhe/benches/utilities.rs
line 703 at r1 (raw file):
/// Instantiate Cuda server key to each available GPU. #[allow(dead_code)] #[cfg(feature = "integer")]
pattern to try to make it less annoying with features
if I have somethign for integer
#[cfg(feature = "integer")]
pub mod my_integer_mod {
}
#[cfg(feature = "integer")]
pub use my_integer_mod::*;
avoids to have to repeat the feature and have dead code potentially
tfhe/benches/integer/bench.rs
line 3329 at r1 (raw file):
fn main() { init_bench_type();
can even be a get_bench_type that populates the once lock on demand
tfhe/benches/integer/glwe_packing_compression.rs
line 368 at r1 (raw file):
fn main() { init_bench_type();
can even be a get_bench_type that populates the once lock on demand so no need to manually init
tfhe/benches/integer/zk_pke.rs
line 440 at r1 (raw file):
fn main() { init_bench_type();
same here probably not needed
Previously, IceTDrinker (Arthur Meyre) wrote…
A getter would mean, to me, returning a value that we should pass around. |
Previously, soonum (David Testé) wrote…
Unless you mean a get_bench_type called directly in the benchmark functions ? |
no something like pub fn get_bench_type() -> BenchType {
static BENCH_TYPE: OnceLock<BenchType> = OnceLocke::new();
BENCH_TYPE.get_or_init(|| /* env var logiv*/)
return bench_type
} you call it where you need it and the bench type is cacehd in the once lock |
5b0c7ed
to
3fe645f
Compare
d499b1f
to
4a6e7f9
Compare
4a6e7f9
to
b4ea49a
Compare
b4ea49a
to
7765f77
Compare
There is still a bit a of work to do but that won't change much the implementation.
Still to do:
elements
generation if neededThis change is