Skip to main content

Module wgpu

Module wgpu 

Source
Expand description

WebGPU backend: device context, buffer management, pipeline cache, and kernel dispatch. Production backend of Forge; the CPU backend is the numerical reference.

Modules§

ops
GPU op wrappers: bind tensors, compute grid sizes, dispatch WGSL kernels. Semantics mirror backend::cpu exactly; see the shader sources for the kernel-side contracts.

Structs§

WgpuContext
Owns the wgpu device/queue and a cache of compiled compute pipelines.

Constants§

OFFSET_ALIGN_BYTES
Storage-buffer offsets must respect this alignment when creating views.

Functions§

linear_grid
Split a linear element count into a (x, y, 1) workgroup grid of 256-thread groups, respecting the 65535 per-dimension dispatch limit.