plugin-ep-webgpu/python/README.md
This directory contains the packaging source for the onnxruntime-ep-webgpu Python package.
Install build dependencies:
pip install -r requirements-build-wheel.txt
Wheels are built via build_wheel.py. Running pip install or pip wheel directly against this directory is not
supported — the source tree contains pyproject.toml.in (a template), not a real pyproject.toml.
python build_wheel.py \
--binary_dir <path-to-built-binaries> \
--version <PEP-440-version> \
--output_dir <output-directory>
Example:
python build_wheel.py \
--binary_dir ./build/Release \
--version 0.1.0.dev20260429 \
--output_dir ./dist
The script combines the pre-built plugin EP binaries with the package source to produce a platform-specific wheel.
Install the wheel and dependencies in a clean environment, then run the smoke test:
python -m venv test_venv
source test_venv/bin/activate # or test_venv\Scripts\Activate.ps1 on Windows
pip install onnx numpy
pip install dist/onnxruntime_ep_webgpu-*.whl # pulls in onnxruntime>=1.24.4
python test/test_webgpu_plugin_ep.py
The wheel declares a runtime dependency on the minimum compatible onnxruntime package, so pip will install (or
verify) a compatible core runtime automatically.
The test validates import, EP registration, device discovery, and inference (requires WebGPU-capable hardware for the
inference portion). Set the environment variable ORT_TEST_VERBOSE=1 to print additional diagnostic information
(environment, available providers, discovered devices, etc.).
The package version is derived from plugin-ep-webgpu/VERSION_NUMBER by the packaging pipeline, which produces a
PEP 440 version string.