singe-cuda 0.1.0-alpha.5

Safe Rust wrappers for CUDA driver, runtime, NVRTC, NVVM, NVTX, memory, streams, modules, and graphs.
Documentation

singe-cuda

Safe and low-level CUDA wrappers used by Singe.

This crate wraps CUDA Driver, CUDA Runtime, NVRTC, NVVM, NVTX, contexts, streams, events, device memory, modules, kernels, graphs, IPC, and JIT helpers. It keeps unsafe FFI calls at the boundary while still exposing enough low-level control for inference runtimes and NVIDIA library wrappers.

Examples

let ctx = singe_cuda::context::Context::create()?;
let stream = ctx.create_stream()?;

let mut memory = singe_cuda::memory::DeviceMemory::<f32>::create(1024)?;
memory.copy_from_host(&vec![1.0_f32; 1024])?;
stream.synchronize()?;

println!("CUDA driver version: {}", singe_cuda::driver::version()?);