fix(gpu): fix a memory leak in ZK's expand

This commit is contained in:
Pedro Alves
2025-04-11 08:29:25 -03:00
committed by Agnès Leroy
parent 6777ffe7f9
commit 1b5f52c869

View File

@@ -204,8 +204,8 @@ template <typename Torus> struct zk_expand_mem {
free(h_indexes_in);
free(h_indexes_out);
free(h_lut_indexes);
free(h_lwe_compact_input_indexes);
free(h_body_id_per_compact_list);
free(h_lwe_compact_input_indexes);
}
}
@@ -215,8 +215,11 @@ template <typename Torus> struct zk_expand_mem {
message_and_carry_extract_luts->release(streams, gpu_indexes, gpu_count);
delete message_and_carry_extract_luts;
cuda_drop_async(tmp_expanded_lwes, streams[0], gpu_indexes[0]);
cuda_drop_async(d_body_id_per_compact_list, streams[0], gpu_indexes[0]);
cuda_drop_async(d_lwe_compact_input_indexes, streams[0], gpu_indexes[0]);
cuda_drop_async(tmp_expanded_lwes, streams[0], gpu_indexes[0]);
cuda_drop_async(tmp_ksed_small_to_big_expanded_lwes, streams[0],
gpu_indexes[0]);
}
};