From 072005d5216004be6bea4b45f69bfaa88aed695d Mon Sep 17 00:00:00 2001 From: Agnes Leroy Date: Mon, 16 Dec 2024 16:13:49 +0100 Subject: [PATCH] fix(gpu): fix memory leak --- backends/tfhe-cuda-backend/cuda/src/integer/comparison.cuh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backends/tfhe-cuda-backend/cuda/src/integer/comparison.cuh b/backends/tfhe-cuda-backend/cuda/src/integer/comparison.cuh index 2535aa26d1..f53096b5fc 100644 --- a/backends/tfhe-cuda-backend/cuda/src/integer/comparison.cuh +++ b/backends/tfhe-cuda-backend/cuda/src/integer/comparison.cuh @@ -137,6 +137,8 @@ __host__ void are_all_comparisons_block_true( h_lut_indexes, num_chunks * sizeof(Torus), streams[0], gpu_indexes[0]); is_max_value_lut->broadcast_lut(streams, gpu_indexes, 0); + cuda_synchronize_stream(streams[0], gpu_indexes[0]); + free(h_lut_indexes); } lut = is_max_value_lut; }