Skip to content
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

Merged
merged 1 commit into from
Aug 29, 2024
Merged

feat(integer): add is_even/is_odd functions #1488

merged 1 commit into from
Aug 29, 2024

Conversation

tmontaigu
Copy link
Contributor

@cla-bot cla-bot bot added the cla-signed label Aug 23, 2024
@tmontaigu tmontaigu requested a review from IceTDrinker August 26, 2024 08:17
Copy link
Member

@IceTDrinker IceTDrinker left a 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(
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Member

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

@tmontaigu tmontaigu requested a review from IceTDrinker August 27, 2024 09:52
Comment on lines 66 to 69
if !ct.block_carries_are_empty() {
if ct
.blocks()
.iter()
.any(|block| self.key.max_degree.validate(block.degree).is_err())
Copy link
Member

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 ?

Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok will do that

@IceTDrinker
Copy link
Member

good to squash, I'll approve the squashed commits

Copy link
Member

@IceTDrinker IceTDrinker left a 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
@tmontaigu tmontaigu merged commit 63571a0 into main Aug 29, 2024
87 checks passed
@tmontaigu tmontaigu deleted the tm/is-even-odd branch August 29, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants