Skip to content

Commit

Permalink
refactor(gpu): configure GPU parameters automatically to multi-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
agnesLeroy committed Aug 1, 2024
1 parent 5547d92 commit 9e18b5c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tfhe/src/high_level_api/keys/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ impl IntegerConfig {
}
}

#[cfg(not(feature = "gpu"))]
pub(in crate::high_level_api) fn default_big() -> Self {
Self {
block_parameters: crate::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS.into(),
Expand All @@ -50,6 +51,17 @@ impl IntegerConfig {
}
}

#[cfg(feature = "gpu")]
pub(in crate::high_level_api) fn default_big() -> Self {
Self {
block_parameters:
crate::shortint::parameters::PARAM_GPU_MULTI_BIT_MESSAGE_2_CARRY_2_GROUP_3_KS_PBS
.into(),
dedicated_compact_public_key_parameters: None,
compression_parameters: None,
}
}

pub(in crate::high_level_api) fn default_small() -> Self {
Self {
block_parameters: crate::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_PBS_KS.into(),
Expand Down

0 comments on commit 9e18b5c

Please sign in to comment.