News

PyTorch adds a WebGPU browser backend to ExecuTorch

PyTorch's experimental ExecuTorch WebGPU backend gives supported exported models a direct route to GPU inference in WebGPU-enabled browsers, with operator, hardware and browser limits.

D
Nov 19, 2026 · 2 min read

PyTorch has added a WebGPU backend to ExecuTorch, giving developers a direct path from exported PyTorch models to GPU inference in compatible browsers without conversion to another framework’s model format.

Developers can pass a model through torch.export and WebGPUPartitioner to produce an ExecuTorch .pte file, then serve that artifact to a WebGPU-enabled browser. The announcement, stable backend documentation, operator-support page and browser playground are publicly accessible. PyTorch calls the backend an early-stage project, and the documentation labels it experimental.

For browser deployment, ExecuTorch’s C++ runtime is compiled to WebAssembly with Emscripten. The emdawnwebgpu bridge connects the runtime’s WebGPU calls to the browser, and supported model operations run as WGSL compute shaders on the GPU. This keeps the export and runtime path within the PyTorch and ExecuTorch toolchain.

Browser support is capability-based rather than universal. PyTorch names Chrome and Safari as examples, while its documentation requires WebGPU to be enabled. The WebGPU API reference classifies WebGPU as limited availability, says it is not a Baseline feature and requires a secure context. Availability can also depend on browser version, operating system, GPU, driver and settings; the WebGPU troubleshooting guide documents several of those conditions for Chrome.

PyTorch says it validated the backend with Llama 3.2 1B, Qwen2.5-0.5B, Qwen3-0.6B and Gemma 3 1B, along with SmolVLM, Depth Anything V2, SAM 2.1 Hiera Tiny, D-FINE, Real-ESRGAN, MODNet, Whisper base and Phonon-31M-EN. It also lists LoRA and DiReFT fine-tuning for three small language models. Those examples do not establish support for arbitrary PyTorch models.

The operator-support documentation lists current coverage, and the overview says more than 100 operators are registered. Support can still vary by tensor rank, shape, layout and data type. Because WebGPUPartitioner reuses Vulkan partitioning, it can select an operation that the WebGPU runtime does not implement; graph construction can then fail instead of falling back automatically. FP16 paths and timestamp queries also depend on the selected GPU adapter.

PyTorch reports that WebGPU was 4–7 times faster for prompt prefill and 2–10 times faster for token decoding than its multithreaded WebAssembly/XNNPACK CPU path in Chrome on an Apple M1 Pro. The company tested quantized Llama 3.2 1B and Qwen3-0.6B, using the median of five runs after three warmups over contexts from 128 to 8,000 tokens. The benchmark was not independently reproduced, and the compared paths used different activation precision: FP32 for WebGPU and dynamic 8-bit activations for XNNPACK.

PyTorch also says prompts, photos, camera frames, audio and model outputs remain on the device during browser inference. That privacy claim has not been independently audited, and the public playground was not exercised in a compatible browser-and-GPU session. PyTorch says further work will focus on speed, stability and broader operator, data-type and model coverage.

More news