From 66a4709da44833dac2a24511fdea0030acd9ea98 Mon Sep 17 00:00:00 2001 From: Nicolas Sarlin Date: Fri, 29 Aug 2025 11:17:11 +0200 Subject: [PATCH] bench: wip ks32 bench --- .github/workflows/benchmark_integer.yml | 2 +- tfhe-benchmark/src/params.rs | 2 +- tfhe-benchmark/src/params_aliases.rs | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmark_integer.yml b/.github/workflows/benchmark_integer.yml index 04e15961d..419ce0c1f 100644 --- a/.github/workflows/benchmark_integer.yml +++ b/.github/workflows/benchmark_integer.yml @@ -62,7 +62,7 @@ jobs: - name: Set benchmark types if: github.event_name == 'workflow_dispatch' run: | - echo "OP_FLAVOR=[\"default\"]" >> "${GITHUB_ENV}" + echo "OP_FLAVOR=[\"fast_default\"]" >> "${GITHUB_ENV}" if [[ "${INPUTS_BENCH_TYPE}" == "both" ]]; then echo "BENCH_TYPE=[\"latency\", \"throughput\"]" >> "${GITHUB_ENV}" else diff --git a/tfhe-benchmark/src/params.rs b/tfhe-benchmark/src/params.rs index fcc33cb7b..73e49a36a 100644 --- a/tfhe-benchmark/src/params.rs +++ b/tfhe-benchmark/src/params.rs @@ -446,7 +446,7 @@ mod integer_params { #[cfg(feature = "hpu")] let params = vec![BENCH_HPU_PARAM_MESSAGE_2_CARRY_2_KS32_PBS_TUNIFORM_2M128.into()]; #[cfg(not(feature = "hpu"))] - let params = vec![BENCH_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128.into()]; + let params = vec![BENCH_PARAM_MESSAGE_2_CARRY_2_KS32_PBS_TUNIFORM_2M128.into()]; let params_and_bit_sizes = iproduct!(params, env_config.bit_sizes()); Self { diff --git a/tfhe-benchmark/src/params_aliases.rs b/tfhe-benchmark/src/params_aliases.rs index 7eaaef7c4..7e261eebc 100644 --- a/tfhe-benchmark/src/params_aliases.rs +++ b/tfhe-benchmark/src/params_aliases.rs @@ -1,8 +1,8 @@ #[cfg(any(feature = "shortint", feature = "integer"))] pub mod shortint_params_aliases { - use tfhe::shortint::parameters::current_params::*; #[cfg(feature = "hpu")] use tfhe::shortint::parameters::KeySwitch32PBSParameters; + use tfhe::shortint::parameters::{current_params::*, KeySwitch32PBSParameters}; use tfhe::shortint::parameters::{ ClassicPBSParameters, CompactPublicKeyEncryptionParameters, CompressionParameters, MultiBitPBSParameters, NoiseSquashingParameters, ShortintKeySwitchingParameters, @@ -32,6 +32,13 @@ pub mod shortint_params_aliases { pub const BENCH_ALL_CLASSIC_PBS_PARAMETERS: [(&ClassicPBSParameters, &str); 140] = VEC_ALL_CLASSIC_PBS_PARAMETERS; + // KS32 + pub const BENCH_PARAM_MESSAGE_2_CARRY_2_KS32_PBS_TUNIFORM_2M128: KeySwitch32PBSParameters = + V1_4_PARAM_MESSAGE_2_CARRY_2_KS32_PBS_TUNIFORM_2M128; + + pub const BENCH_ALL_KS32_PARAMETERS: [(&KeySwitch32PBSParameters, &str); 1] = + VEC_ALL_KS32_PARAMETERS; + // MultiBit // CPU Gaussian pub const BENCH_PARAM_MULTI_BIT_GROUP_2_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M128: