| Crates.io | concrete-cuda |
| lib.rs | concrete-cuda |
| version | 0.1.1 |
| created_at | 2022-07-06 17:24:54.003616+00 |
| updated_at | 2022-10-19 12:40:24.810037+00 |
| description | Cuda implementation for the concrete FHE library. |
| homepage | https://www.zama.ai/concrete-framework |
| repository | https://github.com/zama-ai/concrete-core |
| max_upload_size | |
| id | 620617 |
| size | 904,094 |
This repository holds the code for GPU acceleration of Zama's variant of TFHE. It implements CUDA/C++ functions to perform homomorphic operations on LWE ciphertexts.
In this first API, it provides functions to allocate memory on the GPU, to copy data back and forth between the CPU and the GPU, to create and destroy Cuda streams, etc.:
cuda_create_stream, cuda_destroy_streamcuda_malloc, cuda_check_valid_malloccuda_memcpy_async_to_cpu, cuda_memcpy_async_to_gpucuda_get_number_of_gpuscuda_synchronize_device
The cryptographic operations it provides are:cuda_bootstrap_amortized_lwe_ciphertext_vector_32 and cuda_bootstrap_amortized_lwe_ciphertext_vector_64cuda_bootstrap_low latency_lwe_ciphertext_vector_32 and cuda_bootstrap_low_latency_lwe_ciphertext_vector_64cuda_keyswitch_lwe_ciphertext_vector_32 and cuda_keyswitch_lwe_ciphertext_vector_64These C++/CUDA functions are available to the Concrete-core
implementation via a dedicated Rust API, which is wrapped in the backend_cuda of
concrete-core.
Disclaimer: Compilation on Windows/Mac is not supported yet. Only Nvidia GPUs are supported.
The concrete-cuda functions are available in concrete-core via the backend_cuda.
To compile concrete-core with the Cuda backend, install the aforementioned dependencies, then in
concrete-core type:
cargo build --release --features=backend_cuda
The Cuda project held in concrete-cuda can be compiled separately from the Rust project in the
following way:
git clone git@github.com:zama-ai/concrete-core
cd concrete-core/concrete-cuda/cuda
mkdir build
cd build
cmake ..
make
The compute capability is detected automatically (with the first GPU information) and set accordingly.
This software is distributed under the BSD-3-Clause-Clear license. If you have any questions,
please contact us at hello@zama.ai.