From e47478ae4abbf043f2a9bfe0a4f471b2d1507c20 Mon Sep 17 00:00:00 2001 From: Agnes Leroy Date: Thu, 19 Dec 2024 10:43:56 +0100 Subject: [PATCH 1/2] chore(gpu): fix inconsistency in the use of AmortizedDegree --- .../cuda/src/pbs/programmable_bootstrap_classic.cu | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backends/tfhe-cuda-backend/cuda/src/pbs/programmable_bootstrap_classic.cu b/backends/tfhe-cuda-backend/cuda/src/pbs/programmable_bootstrap_classic.cu index bd5e1f33ec..17859dbdd8 100644 --- a/backends/tfhe-cuda-backend/cuda/src/pbs/programmable_bootstrap_classic.cu +++ b/backends/tfhe-cuda-backend/cuda/src/pbs/programmable_bootstrap_classic.cu @@ -136,7 +136,7 @@ void cuda_programmable_bootstrap_tbc_lwe_ciphertext_vector( num_many_lut, lut_stride); break; case 512: - host_programmable_bootstrap_tbc>( + host_programmable_bootstrap_tbc>( static_cast(stream), gpu_index, lwe_array_out, lwe_output_indexes, lut_vector, lut_vector_indexes, lwe_array_in, lwe_input_indexes, bootstrapping_key, buffer, glwe_dimension, @@ -144,7 +144,7 @@ void cuda_programmable_bootstrap_tbc_lwe_ciphertext_vector( num_many_lut, lut_stride); break; case 1024: - host_programmable_bootstrap_tbc>( + host_programmable_bootstrap_tbc>( static_cast(stream), gpu_index, lwe_array_out, lwe_output_indexes, lut_vector, lut_vector_indexes, lwe_array_in, lwe_input_indexes, bootstrapping_key, buffer, glwe_dimension, @@ -393,7 +393,7 @@ void cuda_programmable_bootstrap_cg_lwe_ciphertext_vector( num_many_lut, lut_stride); break; case 512: - host_programmable_bootstrap_cg>( + host_programmable_bootstrap_cg>( static_cast(stream), gpu_index, lwe_array_out, lwe_output_indexes, lut_vector, lut_vector_indexes, lwe_array_in, lwe_input_indexes, bootstrapping_key, buffer, glwe_dimension, @@ -401,7 +401,7 @@ void cuda_programmable_bootstrap_cg_lwe_ciphertext_vector( num_many_lut, lut_stride); break; case 1024: - host_programmable_bootstrap_cg>( + host_programmable_bootstrap_cg>( static_cast(stream), gpu_index, lwe_array_out, lwe_output_indexes, lut_vector, lut_vector_indexes, lwe_array_in, lwe_input_indexes, bootstrapping_key, buffer, glwe_dimension, @@ -468,7 +468,7 @@ void cuda_programmable_bootstrap_lwe_ciphertext_vector( num_many_lut, lut_stride); break; case 512: - host_programmable_bootstrap>( + host_programmable_bootstrap>( static_cast(stream), gpu_index, lwe_array_out, lwe_output_indexes, lut_vector, lut_vector_indexes, lwe_array_in, lwe_input_indexes, bootstrapping_key, buffer, glwe_dimension, @@ -476,7 +476,7 @@ void cuda_programmable_bootstrap_lwe_ciphertext_vector( num_many_lut, lut_stride); break; case 1024: - host_programmable_bootstrap>( + host_programmable_bootstrap>( static_cast(stream), gpu_index, lwe_array_out, lwe_output_indexes, lut_vector, lut_vector_indexes, lwe_array_in, lwe_input_indexes, bootstrapping_key, buffer, glwe_dimension, From 706239b638a3c3f2dbbb6ee94ba237dac460fda7 Mon Sep 17 00:00:00 2001 From: Agnes Leroy Date: Thu, 19 Dec 2024 10:47:53 +0100 Subject: [PATCH 2/2] chore(gpu): minor fix in core crypto comments --- tfhe/src/core_crypto/gpu/mod.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tfhe/src/core_crypto/gpu/mod.rs b/tfhe/src/core_crypto/gpu/mod.rs index 33695fb46d..5964b4b874 100644 --- a/tfhe/src/core_crypto/gpu/mod.rs +++ b/tfhe/src/core_crypto/gpu/mod.rs @@ -87,7 +87,7 @@ impl Drop for CudaStreams { } } -/// Discarding bootstrap on a vector of LWE ciphertexts +/// Programmable bootstrap on a vector of LWE ciphertexts /// /// # Safety /// @@ -150,7 +150,7 @@ pub unsafe fn programmable_bootstrap_async( ); } -/// Discarding bootstrap on a vector of LWE ciphertexts +/// Programmable multi-bit bootstrap on a vector of LWE ciphertexts /// /// # Safety /// @@ -215,7 +215,7 @@ pub unsafe fn programmable_bootstrap_multi_bit_async( ); } -/// Discarding keyswitch on a vector of LWE ciphertexts +/// Keyswitch on a vector of LWE ciphertexts /// /// # Safety /// @@ -408,7 +408,7 @@ pub unsafe fn extract_lwe_samples_from_glwe_ciphertext_list_async( ); } -/// Discarding assigned addition of a vector of LWE ciphertexts +/// Assigned addition of a vector of LWE ciphertexts /// /// # Safety /// @@ -457,7 +457,7 @@ pub unsafe fn add_lwe_ciphertext_vector_assign_async( ); } -/// Discarding addition of a vector of LWE ciphertexts with a vector of plaintexts +/// Addition of a vector of LWE ciphertexts with a vector of plaintexts /// /// # Safety /// @@ -482,7 +482,7 @@ pub unsafe fn add_lwe_ciphertext_vector_plaintext_vector_async( ); } -/// Discarding assigned negation of a vector of LWE ciphertexts +/// Assigned negation of a vector of LWE ciphertexts /// /// # Safety /// @@ -552,7 +552,7 @@ pub unsafe fn negate_lwe_ciphertext_vector_assign_async( } #[allow(clippy::too_many_arguments)] -/// Discarding assign negation of a vector of LWE ciphertexts representing an integer +/// Assign negation of a vector of LWE ciphertexts representing an integer /// /// # Safety ///