Skip to main content

Module webgpu

Module webgpu 

Source
Expand description

CubeCL WebGPU provider runtime and backend skeleton.

The WebGPU/Metal backend is experimental and implements a narrow operation subset: explicit transfers, F32/C32 dot_general (and the einsum paths that lower to it), F32/I32 transpose and compaction, and the Apple Metal FFT. Elementwise math, reductions, reshape/broadcast, indexing and linear algebra return typed unsupported errors instead of falling back to CPU. The devices-and-gpu guide compares this subset with CUDA.

Structs§

AppleContext
Explicit Apple shared-allocation context for CPU and Metal backends.
AppleTransferStats
Explicit host/device transfer counters for one AppleContext.
WebGpuBackend
CubeCL WebGPU tensor backend.
WebGpuRuntime
CubeCL WebGPU runtime wrapper.
WebGpuRuntimeIdentity
Opaque identity of one exact WebGPU runtime instance.

Functions§

download_webgpu_tensor
Download a CubeCL-managed WebGPU tensor back to host memory.
upload_webgpu_tensor
Upload a host tensor into a CubeCL-managed WebGPU allocation.
webgpu_available
Returns true if a WebGPU adapter is available for CubeCL.
webgpu_runtime_engine_id
Return the canonical WebGPU runtime engine identifier.
webgpu_runtime_engine_registration
Build a runtime engine registration for a WebGpuBackend.
webgpu_runtime_engine_registration_with_id
Build a WebGPU runtime engine registration with a caller-selected engine ID.
webgpu_runtime_hardware_class
Return the canonical WebGPU runtime hardware class.