Skip to content

Commit

Permalink
chore(gpu): let cmux update noise/degree on the c++ side
Browse files Browse the repository at this point in the history
  • Loading branch information
agnesLeroy committed Feb 4, 2025
1 parent 0ce7f87 commit 96513f9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
15 changes: 0 additions & 15 deletions tfhe/src/integer/gpu/ciphertext/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,21 +151,6 @@ impl CudaRadixCiphertextInfo {
.collect(),
}
}
pub(crate) fn after_if_then_else(&self) -> Self {
Self {
blocks: self
.blocks
.iter()
.map(|b| CudaBlockInfo {
degree: Degree::new(b.message_modulus.0 - 1),
message_modulus: b.message_modulus,
carry_modulus: b.carry_modulus,
pbs_order: b.pbs_order,
noise_level: NoiseLevel::NOMINAL,
})
.collect(),
}
}
pub(crate) fn after_overflowing_scalar_add_sub(&self) -> Self {
Self {
blocks: self
Expand Down
1 change: 1 addition & 0 deletions tfhe/src/integer/gpu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2376,6 +2376,7 @@ pub unsafe fn unchecked_cmux_integer_radix_kb_async<T: UnsignedInteger, B: Numer
streams.len() as u32,
std::ptr::addr_of_mut!(mem_ptr),
);
update_noise_degree(radix_lwe_out, &cuda_ffi_radix_lwe_out);
}

#[allow(clippy::too_many_arguments)]
Expand Down
2 changes: 0 additions & 2 deletions tfhe/src/integer/gpu/server_key/radix/cmux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ impl CudaServerKey {
}
}
}
result.as_mut().info = true_ct.as_ref().info.after_if_then_else();

result
}

Expand Down

0 comments on commit 96513f9

Please sign in to comment.