-
Notifications
You must be signed in to change notification settings - Fork 160
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(integer): add is_even/is_odd functions #1488
Conversation
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.
Minor things
); | ||
} | ||
CudaBootstrappingKey::MultiBit(d_multibit_bsk) => { | ||
apply_univariate_lut_kb_async( |
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.
is there also bootstrap then keyswitch ? I don't know the cuda code
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.
I think they only do ks_pbs not pbs_ks
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.
that's weird it seems there is a PBS order in the struct
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.
Yep its in the struct, but its not really used, a quick grep showed me that the inly place where its use is in the gpu's create_trivial_radix function
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.
Well then we likely need a panic in the GPU key decompression to avoid running stuff if we have the wrong pbs order
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 a different pr to check the logic with the gpu team
if !ct.block_carries_are_empty() { | ||
if ct | ||
.blocks() | ||
.iter() | ||
.any(|block| self.key.max_degree.validate(block.degree).is_err()) |
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.
any reason for this change ?
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.
its related to this comment #1488 (comment)
this function does not care about carries, so a smart variant does no make sense unless there is some carry cleaning (or we accept to put a #[allow] of some sort
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.
ah right, I think we have some unused &mut on smart variants where cleaning is not done we end up with an allow IIRC
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.
ok will do that
0607889
to
cf3c28b
Compare
good to squash, I'll approve the squashed commits |
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.
Good like this go for squash, I'll approve then
These ones are pretty simple and so are also directly done for GPU
cf3c28b
to
ab461d5
Compare
Closes https://github.com/zama-ai/tfhe-rs-internal/issues/639