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

Use tfhe_cuda_backend insteaof of concrete_cuda #1064

Closed
wants to merge 3 commits into from

Conversation

BourgerieQuentin
Copy link
Member

workerB

Copy link

cla-bot bot commented Sep 24, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Ubuntu.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@bcm-at-zama bcm-at-zama changed the title Use tfhe_cuda_backend insteof od concrete_cuda Use tfhe_cuda_backend insteaof of concrete_cuda Sep 24, 2024
@bcm-at-zama
Copy link
Contributor

99 files! it's a lot of changes

Copy link

cla-bot bot commented Sep 24, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Ubuntu.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

Copy link

cla-bot bot commented Sep 24, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Ubuntu.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

p->output_lwe_dim.val, p->base_log.val, p->level.val, num_samples);
cuda_drop_async(indexes_gpu, s, loc);
free(indexes);
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is freed here, the CUDA runtime will likely try reading this array much later, once it can actually do the memory transfer. This needs to be deallocated after a synchronization point - see below.

cuda_drop_async(test_vector_idxes_gpu, s, loc);
cuda_drop_async(glwe_ct_gpu, s, loc);
cuda_drop_async(indexes_gpu, s, loc);
free(indexes);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

cuda_drop_async(test_vector_idxes_gpu, s, loc);
cuda_drop_async(glwe_ct_gpu, s, loc);
cuda_drop_async(indexes_gpu, s, loc);
free(indexes);
Dependence *dep =
new Dependence(loc, out, out_gpu, false, false, d0->chunk_id);
// As streams are not synchronized, we can only free this vector
Copy link
Contributor

Choose a reason for hiding this comment

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

I can''t add comment at right line - just 4 lines below is the way to deallocate data after CUDA synch points - it registers the pointer with the runtime then will deallocate after the next cuda synch.

Copy link

cla-bot bot commented Sep 24, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Ubuntu.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

1 similar comment
Copy link

cla-bot bot commented Sep 24, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Ubuntu.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

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

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 7fc2663 Previous: 2a1f449 Ratio
v0 PBS table generation 59009422 ns/iter (± 1243379) 58930979 ns/iter (± 314241) 1.00
v0 PBS simulate dag table generation 37890203 ns/iter (± 414241) 37554649 ns/iter (± 469151) 1.01
v0 WoP-PBS table generation 52298219 ns/iter (± 447515) 52447087 ns/iter (± 585670) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@BourgerieQuentin BourgerieQuentin force-pushed the cuda-tfhe-rs branch 3 times, most recently from e51a9c5 to b9886d1 Compare December 10, 2024 13:05
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