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(gpu): refactor the sample extract entry point #2089

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pdroalves
Copy link
Contributor

@pdroalves pdroalves commented Feb 19, 2025

feat(gpu): refactor the sample extract entry point so the user can pass how many LWEs should be extracted per GLWE

closes: https://github.com/zama-ai/tfhe-rs-internal/issues/925

PR content/description

Check-list:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Relevant issues are marked as resolved/closed, related issues are linked in the description
  • Check for breaking changes (including serialization changes) and add them to commit message following the conventional commit specification

Copy link

⚠️ This PR contains unsigned commits. To get your PR merged, please sign those commits (git rebase --exec 'git commit -S --amend --no-edit -n' @{upstream}) and force push them to this branch (git push --force-with-lease).

If you're new to commit signing, there are different ways to set it up:

Sign commits with gpg

Follow the steps below to set up commit signing with gpg:

  1. Generate a GPG key
  2. Add the GPG key to your GitHub account
  3. Configure git to use your GPG key for commit signing
Sign commits with ssh-agent

Follow the steps below to set up commit signing with ssh-agent:

  1. Generate an SSH key and add it to ssh-agent
  2. Add the SSH key to your GitHub account
  3. Configure git to use your SSH key for commit signing
Sign commits with 1Password

You can also sign commits using 1Password, which lets you sign commits with biometrics without the signing key leaving the local 1Password process.

Learn how to use 1Password to sign your commits.

Watch the demo

@pdroalves pdroalves force-pushed the pa/feat/refactor_sample_extract branch 2 times, most recently from 13e5738 to 18dcb90 Compare February 20, 2025 18:10
@pdroalves pdroalves marked this pull request as ready for review February 20, 2025 18:10
@pdroalves pdroalves force-pushed the pa/feat/refactor_sample_extract branch 2 times, most recently from 6711611 to 4f59e5f Compare February 21, 2025 13:31
…ss how many LWEs should be extracted per GLWE
@pdroalves pdroalves force-pushed the pa/feat/refactor_sample_extract branch from 4f59e5f to 32cc694 Compare February 21, 2025 13:31
@@ -75,21 +75,22 @@ fn glwe_encrypt_sample_extract_decrypt_custom_mod<Scalar: UnsignedTorus + Send +
let input_cuda_glwe_list =
CudaGlweCiphertextList::from_glwe_ciphertext_list(&glwe_list, &streams);

let lwe_per_glwe = 2;
Copy link
Member

Choose a reason for hiding this comment

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

why is this hardcoded to 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No particular reason. I just wanted to test for some value different than lwe_per_glwe = polynomial_size, since this case is already covered with compression.

Do you think it should be something else?

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.

2 participants