Skip to content

Commit

Permalink
chore(gpu): panic if (k + 1)*l > 8 to avoid issue with tbc
Browse files Browse the repository at this point in the history
  • Loading branch information
agnesLeroy committed Nov 25, 2024
1 parent c07fb7c commit baf161e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,8 @@ void cuda_programmable_bootstrap_lwe_ciphertext_vector_64(
uint32_t num_samples, uint32_t num_many_lut, uint32_t lut_stride) {
if (base_log > 64)
PANIC("Cuda error (classical PBS): base log should be <= 64")
if ((glwe_dimension + 1) * level_count > 8)
PANIC("Cuda error (multi-bit PBS): (k + 1)*l should be <= 8")

pbs_buffer<uint64_t, CLASSICAL> *buffer =
(pbs_buffer<uint64_t, CLASSICAL> *)mem_ptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ void cuda_multi_bit_programmable_bootstrap_lwe_ciphertext_vector_64(

if (base_log > 64)
PANIC("Cuda error (multi-bit PBS): base log should be <= 64")
if ((glwe_dimension + 1) * level_count > 8)
PANIC("Cuda error (multi-bit PBS): (k + 1)*l should be <= 8")

pbs_buffer<uint64_t, MULTI_BIT> *buffer =
(pbs_buffer<uint64_t, MULTI_BIT> *)mem_ptr;
Expand Down

0 comments on commit baf161e

Please sign in to comment.