Skip to content

Commit

Permalink
chore(ci): reduce number of keys generated in keycache
Browse files Browse the repository at this point in the history
The keys/ folder was containing lots of unused keys in tests and
thus was eating around 20GB of disk space.
  • Loading branch information
soonum authored and IceTDrinker committed Jun 14, 2024
1 parent 3af990b commit f930775
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions tfhe/examples/utilities/generates_test_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ use tfhe::shortint::parameters::key_switching::{
ShortintKeySwitchingParameters, PARAM_KEYSWITCH_1_1_KS_PBS_TO_2_2_KS_PBS,
};
use tfhe::shortint::parameters::{
ClassicPBSParameters, WopbsParameters, ALL_MULTI_BIT_PARAMETER_VEC, ALL_PARAMETER_VEC,
PARAM_MESSAGE_1_CARRY_1_KS_PBS, PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_3_CARRY_3_KS_PBS,
ClassicPBSParameters, WopbsParameters, ALL_MULTI_BIT_PARAMETER_VEC,
PARAM_MESSAGE_1_CARRY_1_KS_PBS, PARAM_MESSAGE_1_CARRY_2_KS_PBS, PARAM_MESSAGE_1_CARRY_3_KS_PBS,
PARAM_MESSAGE_1_CARRY_4_KS_PBS, PARAM_MESSAGE_1_CARRY_5_KS_PBS, PARAM_MESSAGE_1_CARRY_6_KS_PBS,
PARAM_MESSAGE_2_CARRY_1_KS_PBS, PARAM_MESSAGE_2_CARRY_2_KS_PBS, PARAM_MESSAGE_2_CARRY_3_KS_PBS,
PARAM_MESSAGE_3_CARRY_1_KS_PBS, PARAM_MESSAGE_3_CARRY_2_KS_PBS, PARAM_MESSAGE_3_CARRY_3_KS_PBS,
PARAM_MESSAGE_4_CARRY_4_KS_PBS, WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS,
WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS,
WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS,
Expand Down Expand Up @@ -96,7 +99,22 @@ fn client_server_keys() {
[DEFAULT_PARAMETERS, DEFAULT_PARAMETERS_KS_PBS];
generate_boolean_keys(&BOOLEAN_PARAMS);
} else {
generate_pbs_keys(&ALL_PARAMETER_VEC);
const PBS_KEYS: [ClassicPBSParameters; 13] = [
PARAM_MESSAGE_1_CARRY_1_KS_PBS,
PARAM_MESSAGE_1_CARRY_2_KS_PBS,
PARAM_MESSAGE_1_CARRY_3_KS_PBS,
PARAM_MESSAGE_1_CARRY_4_KS_PBS,
PARAM_MESSAGE_1_CARRY_5_KS_PBS,
PARAM_MESSAGE_1_CARRY_6_KS_PBS,
PARAM_MESSAGE_2_CARRY_1_KS_PBS,
PARAM_MESSAGE_2_CARRY_2_KS_PBS,
PARAM_MESSAGE_2_CARRY_3_KS_PBS,
PARAM_MESSAGE_3_CARRY_1_KS_PBS,
PARAM_MESSAGE_3_CARRY_2_KS_PBS,
PARAM_MESSAGE_3_CARRY_3_KS_PBS,
PARAM_MESSAGE_4_CARRY_4_KS_PBS,
];
generate_pbs_keys(&PBS_KEYS);

const WOPBS_PARAMS: [(ClassicPBSParameters, WopbsParameters); 4] = [
(
Expand Down

0 comments on commit f930775

Please sign in to comment.