-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ntt-bnf) Add back&Forth ntt implementation #2148
base: main
Are you sure you want to change the base?
Conversation
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
Test of ntt-bnf failed after the rebase on last main version. |
After a review, the issue isn't link to changes in decomposition but to some part not correctly retrieved from our |
62276c7
to
aa607fa
Compare
This implementation work on 2**k modulus and used modswitch before and after every cmux. It mimics the HW implementation Also modified the bootstrapping key conversion to correctly work with ciphertext_modulus that is a power of two and with width != of native one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't had time to review the mod switching part, but it seems to have lots of moving parts in different places, there are changes I disagree with on entities, some nits for now, as said haven't had time to review the interesting content of the PR yet
/// Handle modswitch and bit-align | ||
// This part of the code is duplicated within hpu/entities. Indeed, this ntt fix have lot of chance | ||
// to never reach main. And we don't want to have Hpu to depends on it | ||
impl Ntt64View<'_> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be part of the impl block below
@@ -321,7 +321,7 @@ where | |||
{ | |||
data: C, | |||
polynomial_size: PolynomialSize, | |||
ciphertext_modulus: CiphertextModulus<C::Element>, | |||
pub(crate) ciphertext_modulus: CiphertextModulus<C::Element>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, there should be an accessor for this field, it stays private, otherwise anybody can mutate it and make inconsistent entities
impl Ntt64View<'_> { | ||
/// This function switches modulus for a slice of coefficients | ||
/// From: user domain (i.e. pow2 modulus) | ||
/// To: ntt domain ( i.e. prime modulus) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: ( i.e.
-> (i.e.
there is an extraneous space
/// From: ntt domain ( i.e. prime modulus) | ||
/// To: user domain (i.e. pow2 modulus) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: ( i.e.
-> (i.e.
there is an extraneous space
also can align as above
PR content/description
New Pbs implementation based on NTT.
This implementation work on 2**k modulus and used modswitch before and after every cmux. It mimics the HW implementation
Check-list: