Skip to content

Commit

Permalink
fix(gpu): fix wrong number of blocks used in cast
Browse files Browse the repository at this point in the history
  • Loading branch information
pdroalves committed Feb 21, 2025
1 parent fc4abd5 commit 219c755
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tfhe/src/integer/gpu/server_key/radix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ impl CudaServerKey {
ciphertext_modulus,
);

let trimmed_ct_info = ct.as_ref().info.after_trim_radix_blocks_lsb(num_blocks);
let trimmed_ct_info = ct.as_ref().info.after_trim_radix_blocks_lsb(new_num_blocks);
T::from(CudaRadixCiphertext::new(trimmed_ct_list, trimmed_ct_info))
}

Expand Down Expand Up @@ -775,8 +775,7 @@ impl CudaServerKey {
LweCiphertextCount(new_num_blocks),
ciphertext_modulus,
);

let trimmed_ct_info = ct.as_ref().info.after_trim_radix_blocks_msb(num_blocks);
let trimmed_ct_info = ct.as_ref().info.after_trim_radix_blocks_msb(new_num_blocks);
T::from(CudaRadixCiphertext::new(trimmed_ct_list, trimmed_ct_info))
}

Expand Down

0 comments on commit 219c755

Please sign in to comment.