Expand description
CUDA Backend for RingKernel
This crate provides NVIDIA CUDA GPU support for RingKernel using cudarc.
§Features
- Persistent kernel execution (cooperative groups)
- Lock-free message queues in GPU global memory
- PTX compilation via NVRTC
- Multi-GPU support
§Requirements
- NVIDIA GPU with Compute Capability 7.0+
- CUDA Toolkit 11.0+
- Native Linux (persistent kernels) or WSL2 (event-driven fallback)
§Example
ⓘ
use ringkernel_cuda::CudaRuntime;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let runtime = CudaRuntime::new().await?;
let kernel = runtime.launch("vector_add", Default::default()).await?;
kernel.activate().await?;
Ok(())
}Modules§
- stub 🔒
Structs§
- Cuda
Runtime - Stub CUDA runtime when CUDA feature is disabled.
Constants§
- RING_
KERNEL_ PTX_ TEMPLATE - PTX kernel source template for persistent ring kernel.
Functions§
- cuda_
device_ count - Get CUDA device count.
- is_
cuda_ available - Check if CUDA is available at runtime.