Crate ringkernel_cuda

Crate ringkernel_cuda 

Source
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§

CudaRuntime
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.