Skip to main content

Module cuda

Module cuda 

Source
Expand description

Native CUDA execution backend for the WGSL Forge differential oracle.

This bridges PTX modules emitted by crate::wgsl_forge::emit::ptx onto the NVIDIA driver API via cudarc 0.19. It implements the same stateless QualiaCompute contract as the wgpu backend: a single persistent device slab is pre-allocated, and dispatches receive lightweight byte offsets (BufferView) rather than allocating in the hot loop.

cudarc 0.19 (driver redesign): allocation, copies, module loading and launch all hang off a [CudaContext]/[CudaStream] pair. With the default fallback-dynamic-loading feature the crate compiles without the CUDA toolkit present and resolves libraries at runtime, so an absent toolkit degrades to a runtime ForgeError::GpuUnavailable rather than a build failure.

Structsยง

CapturedCudaGraph
Instantiated CUDA graph owned by a prepared runtime.
CudaComputeContext
CudaPipeline