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::cpuexactly; see the shader sources for the kernel-side contracts.
Structs§
- Wgpu
Context - 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.