Skip to content

Add native WebGPU backend integration - #1160

Merged
0xShug0 merged 1 commit into
mainfrom
feature/webgpu-native
Nov 2, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
feature/webgpu-native

Conversation

@0xShug0

@0xShug0 0xShug0 commented Nov 2, 2026

Copy link
Copy Markdown
Owner

This exposes the WebGPU backend from merged #1159 through AudioCPP's native execution paths. Build with ENGINE_ENABLE_WEBGPU=ON and select it with --backend webgpu; browser/WASM support is left for a separate PR.

  • Register WebGPU through the existing backend/device machinery and accept it in CLI, server, C API and the shared exec_plan backend parser. No model-specific execution plans are added.
  • Add native CMake and Linux build-helper support, disabled by default. best retains GGML's existing automatic selection and can select WebGPU when it is built in.
  • Allow WebGPU in VibeVoice's backend validation, select Irodori's existing padding/cropping codec path, and protect Nemotron output-view backing allocations on WebGPU to prevent recurrent-state overwrite. Other backend graph paths retain their existing behavior.
  • Extend backend-device and generic LSTM tests. Keep the GGUF-dependent, fixed-input RNNT comparison under tests/nemotron_asr/, gated on WebGPU and Nemotron being enabled, and outside automatic CTest execution.

No GGML kernel changes, browser example, Emscripten build settings, browser file I/O, eSpeak changes, WASM32 resource-size fixes, or unrelated model timing additions are included.

Validation on RTX 5090 used Debug builds and sequential execution:

  • Built the CLI, server, backend-device test, generic LSTM test and VibeVoice model target with the existing build cache.
  • --version confirms Debug and CPU/CUDA/Vulkan/WebGPU backends.
  • Backend selection and live-device lifetime checks passed with CUDA, Vulkan and WebGPU registered.
  • All 12 default CPU LSTM cases and the WebGPU 640-wide graph-reuse comparison passed.
  • Fixed-input Nemotron predictor/cached-joint comparison passed against CPU, with logit NMSE approximately 3.5e-15.
  • Nemotron streaming via --backend webgpu, without exec_plan, produced the expected transcript: “Concord returned to its place amidst the tents.”
  • After moving the unchanged RNNT graph/checks into the model-specific test, both test targets were rebuilt successfully; inference was not repeated for that relocation.
  • Shell syntax and whitespace checks passed.

Logs are retained locally under logs/webgpu/native-pr/. These are focused integration checks, not a complete model regression, waveform-parity or performance sweep. Native setup and scope are documented in docs/build/WEBGPU.md.

@0xShug0
0xShug0 merged commit fb09bde into main Nov 2, 2026
12 checks passed
@0xShug0
0xShug0 deleted the feature/webgpu-native branch November 2, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant