Skip to content

Commit 6455f02

Browse files
fix(gpu): panics
1 parent 3ec5bf1 commit 6455f02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backends/tfhe-cuda-backend/cuda/src/utils/helper_multi_gpu.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void multi_gpu_copy_array_from_cpu_async(CudaStreams streams,
4444
Torus const *h_src,
4545
uint32_t elements_per_gpu,
4646
bool gpu_memory_allocated) {
47-
PANIC_IF_FALSE(dest.size() == streams.count(),
47+
PANIC_IF_FALSE(dest.size() <= streams.count(),
4848
"Destination multi-GPU LWE array was allocated on a different "
4949
"number of GPUs than requested in this call. ");
5050
for (uint i = 0; i < streams.count(); i++) {
@@ -158,7 +158,7 @@ void multi_gpu_scatter_lwe_async(CudaStreams streams,
158158
if (max_active_gpu_count < streams.count())
159159
PANIC("Cuda error: number of gpus in scatter should be <= number of gpus "
160160
"used to create the lut")
161-
PANIC_IF_FALSE(dest.size() == streams.count(),
161+
PANIC_IF_FALSE(dest.size() <= streams.count(),
162162
"Destination multi-GPU LWE array was allocated on a different "
163163
"number of GPUs than requested in this call. ");
164164
for (uint i = 0; i < streams.count(); i++) {

0 commit comments

Comments
 (0)