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

fix(gpu): add missing delete #1364

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backends/tfhe-cuda-backend/cuda/include/integer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@ template <typename Torus> struct int_fullprop_buffer {
uint32_t gpu_count) {

lut->release(streams, gpu_indexes, 1);
delete lut;
Comment on lines 1035 to +1038
Copy link
Member

Choose a reason for hiding this comment

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

question, I saw this pop up in the updates, gpu_count is ignored and 1 is hardcoded instead ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for the full propagation where the LUT is applied to only one input, so I hardcoded the value to 1 here yes.


cuda_drop_async(tmp_small_lwe_vector, streams[0], gpu_indexes[0]);
cuda_drop_async(tmp_big_lwe_vector, streams[0], gpu_indexes[0]);
Expand Down Expand Up @@ -3258,6 +3259,7 @@ template <typename Torus> struct int_scalar_mul_buffer {
void release(cudaStream_t *streams, uint32_t *gpu_indexes,
uint32_t gpu_count) {
sum_ciphertexts_vec_mem->release(streams, gpu_indexes, gpu_count);
delete sum_ciphertexts_vec_mem;
cuda_drop_async(all_shifted_buffer, streams[0], gpu_indexes[0]);
}
};
Expand Down
Loading