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) |
| 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 and selects the physical GPU 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], {})
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})
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 installedonnxruntimepackage is older than1.24.4. Upgrade withpip install --upgrade "onnxruntime>=1.24.4".
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onnxruntime_ep_webgpu-0.3.0-py3-none-win_arm64.whl.
File metadata
- Download URL: onnxruntime_ep_webgpu-0.3.0-py3-none-win_arm64.whl
- Upload date:
- Size: 14.0 MB
- Tags: Python 3, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4f40d41be2db172120c2f917a8a8c69e28f8a54b221b2bd20d7fca63a291095
|
|
| MD5 |
b35d84a206bd0015a98eb25ffcb14474
|
|
| BLAKE2b-256 |
31ebb1f9c10b7ae56f169c9b61eec91bbb66e15a95b694d39d7c8898ba8a4650
|
File details
Details for the file onnxruntime_ep_webgpu-0.3.0-py3-none-win_amd64.whl.
File metadata
- Download URL: onnxruntime_ep_webgpu-0.3.0-py3-none-win_amd64.whl
- Upload date:
- Size: 13.0 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f25ed449a8f152176a20bc9b2f959a16511f16ff0f962a37979799d1b2d56bf7
|
|
| MD5 |
b872d74cd642847fd7528d26428d2371
|
|
| BLAKE2b-256 |
8420f4d51697015cb1eb0fb027b19bcc8641b93144beaed4cd332979803f0a99
|
File details
Details for the file onnxruntime_ep_webgpu-0.3.0-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: onnxruntime_ep_webgpu-0.3.0-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.6 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
865ce82d80319d7f259a4a65e66e32834f0f117db55ae4377868b4f28016e7bf
|
|
| MD5 |
6eea16a4ee200fc6964bad736eb0ad3b
|
|
| BLAKE2b-256 |
979cd37bc05c56c3d91d44585db7bebbf0f068ece5d01df5b3898449771d4bf2
|
File details
Details for the file onnxruntime_ep_webgpu-0.3.0-py3-none-macosx_14_0_universal2.whl.
File metadata
- Download URL: onnxruntime_ep_webgpu-0.3.0-py3-none-macosx_14_0_universal2.whl
- Upload date:
- Size: 5.0 MB
- Tags: Python 3, macOS 14.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via:
RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
facdb3ad9933cb4504c579c2085c9be1644b6912ee74d7c9a7281046d7e7155a
|
|
| MD5 |
1c0227d4a18ba46c3bb6b774e0ab3e51
|
|
| BLAKE2b-256 |
0f77cfdbe4900a5a38a8b49de9b10254e3ce77f164d246fa3126db7cb7dbc713
|