Skip to content

Commit

Permalink
fix(gpu): fix end index in gpu compression
Browse files Browse the repository at this point in the history
  • Loading branch information
agnesLeroy committed Sep 30, 2024
1 parent 576bc57 commit 03154d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions backends/tfhe-cuda-backend/cuda/include/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ void cuda_memcpy_async_to_gpu(void *dest, void *src, uint64_t size,
void cuda_memcpy_async_gpu_to_gpu(void *dest, void *src, uint64_t size,
cudaStream_t stream, uint32_t gpu_index);

void cuda_memcpy_gpu_to_gpu(void *dest, void *src, uint64_t size,
uint32_t gpu_index);

void cuda_memcpy_async_to_cpu(void *dest, const void *src, uint64_t size,
cudaStream_t stream, uint32_t gpu_index);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl CudaCompressedCiphertextList {
.map(DataKind::num_blocks)
.sum();

let end_block_index = start_block_index + current_info.num_blocks();
let end_block_index = start_block_index + current_info.num_blocks() - 1;

Some((
decomp_key.unpack(
Expand Down

0 comments on commit 03154d5

Please sign in to comment.