Skip to main content

Module webgpu_extension

Module webgpu_extension 

Source
Expand description

WebGPU Extension for QualiaDB Advanced

Continuous-physics compute for fluid dynamics, electromagnetics, heat, waves, particles and dense tensor algebra. Each operation is backed by a real finite-difference / finite-element / N-body solver (the solvers below), validated against an exact analytic solution in its own unit test.

§CPU reference vs. GPU dispatch

The solvers here are the verifiable CPU reference path: deterministic, analytic-solution-tested, and runnable on any machine (no GPU required). This mirrors the core engine’s pattern (modalities/calculus) where the CPU kernel is ground truth and the GPU is an accelerator of the same math.

The WGSL in shaders is the corresponding GPU kernel spec. GPU acceleration routes through the core engine’s shared wgpu device (qualia-core-db hetero_dispatch / WebGpuIntegrator) rather than a second device spun up here — the repo deliberately owns a single wgpu stack. The CPU reference is what the tests exercise and what runs when no GPU is present.

Modules§

electromagnetics
1D electromagnetics by the Yee FDTD scheme (the canonical, validatable Maxwell solver).
fluid
Incompressible 2D Navier–Stokes (periodic) via Chorin’s projection method.
heat
2D heat diffusion ∂u/∂t = α∇²u by explicit finite differences (periodic).
particles
Gravitational N-body simulation by velocity-Verlet (symplectic), 2D.
shaders
WGSL kernel specs mirroring the CPU reference solvers.
tensor
Dense matrix multiply C[m×n] = A[m×k] · B[k×n] (row-major).
wave
2D wave equation ∂²u/∂t² = c²∇²u by explicit leapfrog (periodic).

Structs§

ConvergenceInfo
Convergence / residual report from a solve.
DispatchParams
Time-stepping / iteration controls.
GpuPerformanceMetrics
Measured throughput of the solve. On the CPU reference path the gpu_*_utilization fields are 0.0 (not applicable); the time, FLOP-rate and bandwidth figures are measured, not invented.
SolverReport
Output of a solver: the field data plus honest residual/effort bookkeeping.
WebGpuExecutionResult
Result of a physics solve.
WebGpuExtension
WebGPU Extension implementation
WebGpuJobParams
Job parameters for a physics solve.
WebGpuShader
A GPU compute-shader spec (the kernel the CPU reference solver mirrors).
WebGpuShaderManager
Registry of the GPU kernel specs (WGSL) for the supported physics domains.

Enums§

ShaderType
Physics domains this extension can solve.