chore(bench): add dedicated targets for aes cuda benchmarks

This commit is contained in:
David Testé
2025-11-20 12:30:21 +01:00
committed by David Testé
parent 9b5df143cb
commit 58378b7972
7 changed files with 60 additions and 9 deletions

View File

@@ -126,6 +126,18 @@ path = "benches/integer/zk_pke.rs"
harness = false
required-features = ["integer", "zk-pok", "pbs-stats", "internal-keycache"]
[[bench]]
name = "integer-aes"
path = "benches/integer/aes.rs"
harness = false
required-features = ["integer", "internal-keycache"]
[[bench]]
name = "integer-aes256"
path = "benches/integer/aes256.rs"
harness = false
required-features = ["integer", "internal-keycache"]
[[bench]]
name = "core_crypto-ks"
path = "benches/core_crypto/ks_bench.rs"

View File

@@ -1,8 +1,10 @@
use criterion::Criterion;
#[cfg(feature = "gpu")]
pub mod cuda {
use benchmark::params_aliases::BENCH_PARAM_GPU_MULTI_BIT_GROUP_4_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128;
use benchmark::utilities::{write_to_json, OperatorType};
use criterion::{black_box, Criterion};
use criterion::{black_box, criterion_group, Criterion};
use tfhe::core_crypto::gpu::{check_valid_cuda_malloc, CudaStreams};
use tfhe::integer::gpu::ciphertext::CudaUnsignedRadixCiphertext;
use tfhe::integer::gpu::CudaServerKey;
@@ -150,4 +152,16 @@ pub mod cuda {
bench_group.finish();
}
criterion_group!(gpu_aes, cuda_aes);
}
#[cfg(feature = "gpu")]
use cuda::gpu_aes;
fn main() {
#[cfg(feature = "gpu")]
gpu_aes();
Criterion::default().configure_from_args().final_summary();
}

View File

@@ -1,8 +1,10 @@
use criterion::Criterion;
#[cfg(feature = "gpu")]
pub mod cuda {
use benchmark::params_aliases::BENCH_PARAM_GPU_MULTI_BIT_GROUP_4_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128;
use benchmark::utilities::{write_to_json, OperatorType};
use criterion::{black_box, Criterion};
use criterion::{black_box, criterion_group, Criterion};
use tfhe::core_crypto::gpu::{check_valid_cuda_malloc, CudaStreams};
use tfhe::integer::gpu::ciphertext::CudaUnsignedRadixCiphertext;
use tfhe::integer::gpu::CudaServerKey;
@@ -154,4 +156,15 @@ pub mod cuda {
bench_group.finish();
}
criterion_group!(gpu_aes_256, cuda_aes_256);
}
#[cfg(feature = "gpu")]
use cuda::gpu_aes_256;
fn main() {
#[cfg(feature = "gpu")]
gpu_aes_256();
Criterion::default().configure_from_args().final_summary();
}

View File

@@ -2799,8 +2799,6 @@ mod cuda {
cuda_trailing_ones,
cuda_ilog2,
oprf::cuda::cuda_unsigned_oprf,
aes::cuda::cuda_aes,
aes256::cuda::cuda_aes_256,
);
criterion_group!(
@@ -2829,8 +2827,6 @@ mod cuda {
cuda_scalar_div,
cuda_scalar_rem,
oprf::cuda::cuda_unsigned_oprf,
aes::cuda::cuda_aes,
aes256::cuda::cuda_aes_256,
);
criterion_group!(