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.devYYYYMMDD --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 onnxruntime
pip install dist/onnxruntime_ep_webgpu-*.whl
python test/test_webgpu_plugin_ep.py
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.