| Crates.io | tfhe-cuda-backend |
| lib.rs | tfhe-cuda-backend |
| version | 0.12.0-alpha.0 |
| created_at | 2024-01-22 16:20:30.178872+00 |
| updated_at | 2025-09-24 14:06:40.726822+00 |
| description | Cuda implementation of TFHE-rs primitives. |
| homepage | https://www.zama.ai/ |
| repository | https://github.com/zama-ai/tfhe-rs |
| max_upload_size | |
| id | 1108954 |
| size | 3,305,371 |
The tfhe-cuda-backend holds the code for GPU acceleration of Zama's variant of TFHE.
It implements CUDA/C++ functions to perform homomorphic operations on LWE ciphertexts.
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:Disclaimer: Compilation on Windows/Mac is not supported yet. Only Nvidia GPUs are supported.
The Cuda project held in tfhe-cuda-backend can be compiled independently of TFHE-rs in the following way:
git clone git@github.com:zama-ai/tfhe-rs
cd backends/tfhe-cuda-backend/cuda
mkdir build
cd build
cmake ..
make
The compute capability is detected automatically (with the first GPU information) and set accordingly. If your machine does not have an available Nvidia GPU, the compilation will work if you have the nvcc compiler installed. The generated executable will target a 7.0 compute capability (sm_70).
This software is distributed under the BSD-3-Clause-Clear license. If you have any questions,
please contact us at hello@zama.ai.