Phase 04 — Hardware Acceleration
Acceleration is not a checkbox. It introduces a device, command and synchronization model, buffer residency, transfer costs, feature limits, and new sources of numerical variation. This phase compares two different abstraction levels without presenting either as “faster Wasm.”
Branches
- WebGPU for AI — adapters, devices, buffers, bind groups, compute pipelines, WGSL, workgroups, dispatch, synchronization, profiling, and CPU/GPU transfer costs.
- WebNN & Adaptive Backends — graph construction,
MLTensor, device selection, operator support, feature detection, buffer sharing, compatibility, and visible fallback policy.
Workbench milestone
v4 — Adaptive backend: detect actual capabilities and select WebNN, WebGPU, Wasm SIMD, or scalar Wasm according to a documented policy. Show the selected backend, reason, model/runtime compatibility, and any fallback in the UI and report.
What this phase establishes
- A WebGPU kernel whose data movement and dispatch can be compared with Wasm SIMD.
- A WebNN path treated as a non-universal evolving API.
- Capability checks based on operations needed, not only API presence.
- Backend-specific golden comparisons and tolerance policies.
- A decision system that can refuse or degrade instead of silently substituting work.
Exit criteria
- WebGPU compute and transfer time are measured separately.
- WebNN support is recorded with browser build, device, operators, and consultation date.
- Every backend consumes equivalent fixtures and reports numerical difference.
- Forced fallback tests prove the selected backend and reason remain visible.
Continue with Phase 05: Local-First AI.