Skip to main content

ONNX Runtime WebGPU Plugin Execution Provider

WebGPU Plugin Execution Provider for ONNX Runtime.

Prerequisites

This package provides the WebGPU plugin EP only. You must separately install an ONNX Runtime package (e.g. onnxruntime) of version 1.24.4 or later.

If the installed ONNX Runtime is incompatible, the plugin EP will report an error when its library is registered.

On Linux, a system Vulkan loader (libvulkan.so.1) must be installed and available at runtime.

Supported Platforms

Platform
Windows x64
Windows arm64
Linux x64 (manylinux)
Linux aarch64 (manylinux)
macOS arm64

Installation

pip install "onnxruntime>=1.24.4"
pip install onnxruntime-ep-webgpu

Usage

import numpy as np
import onnxruntime as ort
import onnxruntime_ep_webgpu as webgpu_ep

# Register the plugin EP library with ONNX Runtime
ort.register_execution_provider_library("webgpu", webgpu_ep.get_library_path())

# Discover WebGPU EP devices
# The WebGPU EP currently accepts one EP device. Select a physical Dawn adapter independently.
webgpu_ep_device = next((d for d in ort.get_ep_devices() if d.ep_name == webgpu_ep.get_ep_name()), None)
if webgpu_ep_device is None:
    raise RuntimeError("No WebGPU EP device found.")

# Create a session using the WebGPU EP
sess_options = ort.SessionOptions()
sess_options.add_provider_for_devices(
  [webgpu_ep_device],
  {"adapterIndex": "0"},
)
session = ort.InferenceSession("model.onnx", sess_options=sess_options)

# Run inference (replace shape/dtype/name to match your model)
input_data = np.zeros((1, 3, 224, 224), dtype=np.float32)
output = session.run(None, {"input": input_data})

adapterIndex is a zero-based index into Dawn's adapter enumeration for the requested backend, using the power preference as an ordering and selection hint. It selects a physical adapter; deviceId remains the ORT WebGPU context identifier and does not select a GPU. The default context owns one device per process, so use a separate process for each adapter, or supply a custom webgpuInstance/webgpuDevice pair for multiple devices in one process. Omit adapterIndex to retain Dawn's automatic adapter selection.

Troubleshooting

  • No WebGPU EP device found — the plugin EP loaded but no compatible adapter was discovered. On Linux this usually means the Vulkan loader (libvulkan.so.1) is not installed; install it via your distribution's package manager. On Windows it may indicate a missing or outdated GPU driver.
  • ORT runtime version "..." is below the minimum required version "1.24.4" — the installed onnxruntime package is older than 1.24.4. Upgrade with pip install --upgrade "onnxruntime>=1.24.4".

Metadata

Release files for onnxruntime-ep-webgpu 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for onnxruntime-ep-webgpu 0.5.0
File Actions
onnxruntime_ep_webgpu-0.5.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for onnxruntime_ep_webgpu-0.5.0-py3-none-win_arm64.whl
onnxruntime_ep_webgpu-0.5.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for onnxruntime_ep_webgpu-0.5.0-py3-none-win_amd64.whl
onnxruntime_ep_webgpu-0.5.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for onnxruntime_ep_webgpu-0.5.0-py3-none-manylinux_2_28_x86_64.whl
onnxruntime_ep_webgpu-0.5.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for onnxruntime_ep_webgpu-0.5.0-py3-none-manylinux_2_28_aarch64.whl
onnxruntime_ep_webgpu-0.5.0-py3-none-macosx_14_0_universal2.whl Python 3 none macOS 14.0+ universal2 (ARM64, x86-64) Details for onnxruntime_ep_webgpu-0.5.0-py3-none-macosx_14_0_universal2.whl

Total release size: 46.1 MB

Release files / onnxruntime_ep_webgpu-0.5.0-py3-none-win_arm64.whl

Download URL onnxruntime_ep_webgpu-0.5.0-py3-none-win_arm64.whl
Size 14.6 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
928b3849a52403b5ccee3264a721a104c0fa3ebebb1e725d486e9dc6611f848e
BLAKE2b-256 checksum
How to use checksums
b1f2f62eb9fde3b790507da4e1c4a3f366ea8e69b3b424fe70e97c898dd8f9c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / onnxruntime_ep_webgpu-0.5.0-py3-none-win_amd64.whl

Download URL onnxruntime_ep_webgpu-0.5.0-py3-none-win_amd64.whl
Size 13.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
713b94e7b4ce5979a356e19b926ecba2c0d4ba24f857ef4bbb11c75c37cc5b61
BLAKE2b-256 checksum
How to use checksums
7e369935a5b7851099da3da81d9e04f3021bcc61a5a1039e6c098cf08e5c6607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / onnxruntime_ep_webgpu-0.5.0-py3-none-manylinux_2_28_x86_64.whl

Download URL onnxruntime_ep_webgpu-0.5.0-py3-none-manylinux_2_28_x86_64.whl
Size 6.9 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b6baa3e223d9a679023388b1179e5597b6bc0d282ba72f2afe38d46ef37deeb4
BLAKE2b-256 checksum
How to use checksums
e21dac0ccbe8bd6435b6e1946fea964790ffa3d73ee2513775e90958fd6b860e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / onnxruntime_ep_webgpu-0.5.0-py3-none-manylinux_2_28_aarch64.whl

Download URL onnxruntime_ep_webgpu-0.5.0-py3-none-manylinux_2_28_aarch64.whl
Size 6.1 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d39e0769f8b2ff7a4b04a492ef882510474d52cf722408d393569b36558b2829
BLAKE2b-256 checksum
How to use checksums
93ca71f305dc822d62ef33d7f3862ba7058a0099086112d9ab679d8252e7b77d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / onnxruntime_ep_webgpu-0.5.0-py3-none-macosx_14_0_universal2.whl

Download URL onnxruntime_ep_webgpu-0.5.0-py3-none-macosx_14_0_universal2.whl
Size 4.9 MB
Tags Python 3 macOS 14.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
c9a757c7afaf114fde86993420810ff616e2d3046d42ae419bb0c8b9ebcf57fb
BLAKE2b-256 checksum
How to use checksums
2cc3e047d38981e7d6f198f92b488e2c9cd12e45c73017ec851996ea69778922
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Security for onnxruntime-ep-webgpu 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page