diff --git a/compilers/concrete-compiler/compiler/lib/Runtime/GPUDFG.cpp b/compilers/concrete-compiler/compiler/lib/Runtime/GPUDFG.cpp index 06e7b33188..4fb6e849fd 100644 --- a/compilers/concrete-compiler/compiler/lib/Runtime/GPUDFG.cpp +++ b/compilers/concrete-compiler/compiler/lib/Runtime/GPUDFG.cpp @@ -1085,7 +1085,7 @@ void memref_keyswitch_lwe_u64_process(Process *p, int32_t loc, int32_t chunk_id, for (uint32_t i = 0; i < num_samples; i++) { indexes[i] = i; } - void *indexes_gpu = alloc_and_memcpy_async_to_gpu(indexes, 0, num_samples * sizeof(uint64_t), loc, s); + void *indexes_gpu = alloc_and_memcpy_async_to_gpu(indexes, 0, num_samples, loc, s); cuda_keyswitch_lwe_ciphertext_vector_64( s, loc, out_gpu, indexes_gpu, ct0_gpu, indexes_gpu, ksk_gpu, p->input_lwe_dim.val, @@ -1192,7 +1192,7 @@ void memref_bootstrap_lwe_u64_process(Process *p, int32_t loc, int32_t chunk_id, for (uint32_t i = 0; i < num_samples; i++) { indexes[i] = i; } - void *indexes_gpu = alloc_and_memcpy_async_to_gpu(indexes, 0, num_samples * sizeof(uint64_t), loc, s); + void *indexes_gpu = alloc_and_memcpy_async_to_gpu(indexes, 0, num_samples, loc, s); int8_t *pbs_buffer = p->dfg->gpus[loc].get_pbs_buffer( p->glwe_dim.val, p->poly_size.val, num_samples);