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

Tm/backports #2058

Merged
merged 5 commits into from
Feb 18, 2025
Merged

Tm/backports #2058

merged 5 commits into from
Feb 18, 2025

Conversation

tmontaigu
Copy link
Contributor

backport of a few bug fixes

For Signed and Unsigned DataKind, the degree was
incorrectly set, leading to unneeded carry propagations
Some counts where to copied from the correct
source to correct destination.

And more importantly, the list on cuda side was stored
using a GlweCiphertextList but the data was compressed
(so the list was mostly empty). This use of a GlweList
instead of a specialized type lead to problems when converting
to Cpu
This commit fixes a few bugs

* The shift/rotate functions used when blocks encrypt a number of bits
  that is a power of 2 was causing a panic when working on one block.
  - Also, when the number of blocks was low (e.g 2 blocks with 2_2
    params) a noise cleaning step was wrongly skipped

* The function used when blocks encrypt non power of 2 number of bits
  also had a problem

The test have been updated to test with different block sizes and check
the noise level

Overall these bugs only affected low block counts (e.g FheUint2,
FheUint4) ciphertexts
@cla-bot cla-bot bot added the cla-signed label Feb 12, 2025
IceTDrinker and others added 2 commits February 18, 2025 16:55
- the CPU data layout is truncated to only store relevant bodies (i.e.
emtpy bodies are assumed to be 0) but the GPU CUDA code manages full GLWEs
only. To fix that we manage the data layout during conversions to have
consistent behavior when copying the list to/from CPU/GPU. Compression code
has been fixed on the CPU side to have the proper length for the output
expected by the CUDA code
@IceTDrinker IceTDrinker merged commit 6e0f86d into release/0.11.x Feb 18, 2025
88 of 94 checks passed
@IceTDrinker IceTDrinker deleted the tm/backports branch February 18, 2025 16:54
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