Expand description
WebGPU Backend for RingKernel
This crate provides cross-platform GPU support via WebGPU (wgpu). Works on Vulkan, Metal, DX12, and browser environments.
§Features
- Cross-platform GPU access (Windows, macOS, Linux, Web)
- Event-driven execution model (WebGPU limitation)
- WGSL shader language support
§Limitations
- No true persistent kernels (WebGPU doesn’t support cooperative groups)
- No 64-bit atomics in WGSL
- Event-driven execution only
§Example
ⓘ
use ringkernel_wgpu::WgpuRuntime;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let runtime = WgpuRuntime::new().await?;
let kernel = runtime.launch("compute", Default::default()).await?;
kernel.activate().await?;
Ok(())
}Modules§
- stub 🔒
Structs§
- Wgpu
Runtime - Stub WebGPU runtime when wgpu feature is disabled.
Constants§
- RING_
KERNEL_ WGSL_ TEMPLATE - WGSL shader template for ring kernel.
Functions§
- is_
wgpu_ available - Check if WebGPU is available at runtime.