mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
- a new crate concrete-cuda is added to the repository, containing some Cuda implementations for the bootstrap and keyswitch and a Rust wrapping to call them - a new backend_cuda is added to concrete-core, with dedicated entities whose memory is located on the GPU and engines that call the Cuda accelerated functions
31 lines
936 B
C++
31 lines
936 B
C++
#include <cstdint>
|
|
|
|
extern "C" {
|
|
void *cuda_create_stream(uint32_t gpu_index);
|
|
|
|
int cuda_destroy_stream(void *v_stream, uint32_t gpu_index);
|
|
|
|
void *cuda_malloc(uint64_t size, uint32_t gpu_index);
|
|
|
|
int cuda_check_valid_malloc(uint64_t size, uint32_t gpu_index);
|
|
|
|
int cuda_memcpy_to_cpu(void *dest, const void *src, uint64_t size,
|
|
uint32_t gpu_index);
|
|
|
|
int cuda_memcpy_async_to_gpu(void *dest, void *src, uint64_t size,
|
|
void *v_stream, uint32_t gpu_index);
|
|
|
|
int cuda_memcpy_to_gpu(void *dest, void *src, uint64_t size,
|
|
uint32_t gpu_index);
|
|
|
|
int cuda_memcpy_async_to_cpu(void *dest, const void *src, uint64_t size,
|
|
void *v_stream, uint32_t gpu_index);
|
|
int cuda_get_number_of_gpus();
|
|
|
|
int cuda_synchronize_device(uint32_t gpu_index);
|
|
|
|
int cuda_drop(void *ptr, uint32_t gpu_index);
|
|
|
|
int cuda_get_max_shared_memory(uint32_t gpu_index);
|
|
}
|