Skip to content

Commit

Permalink
fix(gpu): fix noise level calculation in full propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
bbarbakadze authored and agnesLeroy committed Dec 18, 2024
1 parent 950cece commit 9e8db21
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tfhe/src/integer/gpu/server_key/radix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,14 @@ impl CudaServerKey {
);
}
};
ciphertext
.info
.blocks
.iter_mut()
.for_each(|b| b.degree = Degree::new(b.message_modulus.0 - 1));
ciphertext.info.blocks.iter_mut().for_each(|b| {
b.degree = Degree::new(b.message_modulus.0 - 1);
b.noise_level = if b.noise_level == NoiseLevel::ZERO {
NoiseLevel::ZERO
} else {
NoiseLevel::NOMINAL
};
});
}

/// Prepend trivial zero LSB blocks to an existing [`CudaUnsignedRadixCiphertext`] or
Expand Down

0 comments on commit 9e8db21

Please sign in to comment.