Skip to content

Commit 92638c2

Browse files
b5licopybara-github
authored andcommitted
Use production parameters in benchmarks
PiperOrigin-RevId: 827560619
1 parent d08fbb7 commit 92638c2

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

willow/benches/BUILD

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ rust_library(
2929
"@crate_index//:clap",
3030
"//willow/src/api:willow_api_common",
3131
"//willow/src/shell:kahe_shell",
32-
"//willow/src/shell:shell_parameters_generation",
32+
"//willow/src/shell:parameters_shell",
3333
"//willow/src/shell:single_thread_hkdf",
3434
"//willow/src/shell:vahe_shell",
3535
"//willow/src/testing_utils",
36-
"//willow/src/testing_utils:shell_testing_parameters",
3736
"//willow/src/traits:client_traits",
3837
"//willow/src/traits:decryptor_traits",
3938
"//willow/src/traits:kahe_traits",

willow/benches/shell_benchmarks.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ use kahe_shell::ShellKahe;
2323
use kahe_traits::KaheBase;
2424
use prng_traits::SecurePrng;
2525
use server_traits::SecureAggregationServer;
26-
use shell_parameters_generation::generate_packing_config;
27-
use shell_testing_parameters::{make_ahe_config, make_kahe_config_for};
26+
use parameters_shell::create_shell_configs;
2827
use single_thread_hkdf::SingleThreadHkdfPrng;
2928
use testing_utils::{generate_random_unsigned_vector, ShellClient, ShellClientMessage};
3029
use vahe_shell::ShellVahe;
@@ -48,22 +47,14 @@ pub struct Args {
4847
#[arg(short = 'l', long, default_value_t = 100)]
4948
pub input_length: usize,
5049

51-
/// Input domain, i.e. each client submits a vector in [0,t)^l.
50+
/// Input domain, i.e. each client submits a vector in [0,t]^l.
5251
#[arg(short = 't', long, default_value_t = 10)]
5352
pub input_domain: u64,
5453

5554
/// Max number of clients.
5655
#[arg(short = 'n', long, default_value_t = 1_000)]
5756
pub max_num_clients: usize,
5857

59-
/// Number of values to pack on each coefficient.
60-
#[arg(short = 'L', long, default_value_t = 2)]
61-
pub num_packing: usize,
62-
63-
/// Number of bits in the plaintext modulus.
64-
#[arg(long, default_value_t = 93)]
65-
pub plaintext_modulus_bits: usize,
66-
6758
/// Number of iterations.
6859
#[arg(long, default_value_t = 1_000)]
6960
pub n_iterations: usize,
@@ -133,11 +124,7 @@ fn setup_base(args: &Args) -> BaseInputs {
133124
session_id: String::from("benchmark"),
134125
willow_version: (1, 0),
135126
};
136-
let packed_vector_configs =
137-
generate_packing_config(args.plaintext_modulus_bits, &aggregation_config).unwrap();
138-
let kahe_config =
139-
make_kahe_config_for(args.plaintext_modulus_bits, packed_vector_configs).unwrap();
140-
let ahe_config = make_ahe_config();
127+
let (kahe_config, ahe_config) = create_shell_configs(&aggregation_config).unwrap();
141128
let public_kahe_seed = SingleThreadHkdfPrng::generate_seed().unwrap();
142129
let public_ahe_seed = SingleThreadHkdfPrng::generate_seed().unwrap();
143130

willow/src/shell/parameters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub fn create_shell_configs(
159159

160160
if total_input_length <= 10_000_000
161161
&& *max_input_bound <= (1i64 << 32)
162-
&& aggregation_config.max_number_of_clients <= 10000000
162+
&& aggregation_config.max_number_of_clients <= 10_000_000
163163
&& aggregation_config.max_number_of_decryptors <= 100
164164
{
165165
let packed_vector_configs =

0 commit comments

Comments
 (0)