-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(gpu): start using a struct to pass data across rust/c++
- Loading branch information
1 parent
cc85c44
commit 01a1ff1
Showing
48 changed files
with
1,152 additions
and
925 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
backends/tfhe-cuda-backend/cuda/include/integer/radix_ciphertext.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef CUDA_RADIX_CIPHERTEXT_H | ||
#define CUDA_RADIX_CIPHERTEXT_H | ||
|
||
#include "device.h" | ||
#include "integer.h" | ||
|
||
template <typename Torus> | ||
void create_trivial_radix_ciphertext_async(cudaStream_t const stream, | ||
uint32_t const gpu_index, | ||
CudaRadixCiphertextFFI *output_radix, | ||
uint32_t num_radix_blocks, | ||
uint32_t lwe_dimension); | ||
|
||
// end_lwe_index is inclusive | ||
template <typename Torus> | ||
void as_radix_ciphertext_slice(CudaRadixCiphertextFFI *output_radix, | ||
const CudaRadixCiphertextFFI *input_radix, | ||
uint32_t start_lwe_index, | ||
uint32_t end_lwe_index); | ||
|
||
template <typename Torus> | ||
void copy_radix_ciphertext_to_larger_output_slice_async( | ||
cudaStream_t const stream, uint32_t const gpu_index, | ||
CudaRadixCiphertextFFI *output_radix, | ||
const CudaRadixCiphertextFFI *input_radix, uint32_t output_start_lwe_index); | ||
|
||
void release_radix_ciphertext_data(cudaStream_t const stream, | ||
uint32_t const gpu_index, | ||
CudaRadixCiphertextFFI *data); | ||
|
||
#endif // CUDA_RADIX_CIPHERTEXT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.