Microsoft.ML.OnnxRuntime.EP.WebGpu
0.6.0
Prefix Reserved
dotnet add package Microsoft.ML.OnnxRuntime.EP.WebGpu --version 0.6.0
NuGet\Install-Package Microsoft.ML.OnnxRuntime.EP.WebGpu -Version 0.6.0
<PackageReference Include="Microsoft.ML.OnnxRuntime.EP.WebGpu" Version="0.6.0" />
<PackageVersion Include="Microsoft.ML.OnnxRuntime.EP.WebGpu" Version="0.6.0" />
<PackageReference Include="Microsoft.ML.OnnxRuntime.EP.WebGpu" />
paket add Microsoft.ML.OnnxRuntime.EP.WebGpu --version 0.6.0
#r "nuget: Microsoft.ML.OnnxRuntime.EP.WebGpu, 0.6.0"
#:package Microsoft.ML.OnnxRuntime.EP.WebGpu@0.6.0
#addin nuget:?package=Microsoft.ML.OnnxRuntime.EP.WebGpu&version=0.6.0
#tool nuget:?package=Microsoft.ML.OnnxRuntime.EP.WebGpu&version=0.6.0
Microsoft.ML.OnnxRuntime.EP.WebGpu
WebGPU plugin Execution Provider for ONNX Runtime.
Prerequisites
This package provides the WebGPU plugin EP only. Your project must separately reference an ONNX Runtime
core package (e.g. Microsoft.ML.OnnxRuntime) of version 1.24.4 or later.
If the referenced 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.
On Windows, Agility-enabled builds of this package include the pinned preview D3D12 Agility SDK runtime. The
buildTransitive target copies the SDK DLLs into a D3D12 directory next to the WebGPU provider after build and
publish. Activation requires a supported Windows version with the Agility SDK loader update, Windows Developer Mode
because the SDK is a preview release, and a compatible GPU driver. The pinned SDK requires Windows 10 version 1909 or
newer. For Windows 10 versions 1909, 2004, and 20H2, version 1909 requires build 18363.1350 or newer, while versions
2004 and 20H2 require revision 789 or newer. Later Windows versions do not require a separate revision check. The
presence of %SystemRoot%\System32\D3D12Core.dll also confirms that the system has the Agility SDK loader update. For
setup details and current driver guidance, see Microsoft's
DirectX 12 Agility SDK setup guide
and the
Agility SDK 721 Preview announcement.
Supported Platforms
| Runtime Identifier (RID) |
|---|
| win-x64 |
| win-arm64 |
| linux-x64 |
| linux-arm64 |
| osx-arm64 |
Installation
dotnet add package Microsoft.ML.OnnxRuntime --version 1.24.4
dotnet add package Microsoft.ML.OnnxRuntime.EP.WebGpu
Usage
// Note: Error handling is omitted for brevity, except for the device-discovery check below.
using Microsoft.ML.OnnxRuntime;
using Microsoft.ML.OnnxRuntime.EP.WebGpu;
// Register the WebGPU EP plugin library
var env = OrtEnv.Instance();
env.RegisterExecutionProviderLibrary("webgpu_ep", WebGpuEp.GetLibraryPath());
// Find the WebGPU EP device
OrtEpDevice? webGpuDevice = null;
foreach (var d in env.GetEpDevices())
{
if (d.EpName == WebGpuEp.GetEpName())
{
webGpuDevice = d;
break;
}
}
if (webGpuDevice is null)
{
throw new InvalidOperationException("No WebGPU device found.");
}
// Create a session with the WebGPU EP
using var sessionOptions = new SessionOptions();
sessionOptions.AppendExecutionProvider(env, new[] { webGpuDevice }, new Dictionary<string, string>());
using var session = new InferenceSession("model.onnx", sessionOptions);
Troubleshooting
No WebGPU 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 referencedMicrosoft.ML.OnnxRuntimepackage is older than1.24.4. Upgrade withdotnet add package Microsoft.ML.OnnxRuntime --version 1.24.4.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Microsoft.ML.OnnxRuntime.EP.WebGpu:
| Package | Downloads |
|---|---|
|
RailReader.Core.Analysis.WebGpu
Opt-in GPU acceleration for RailReader.Core.Analysis's layout analyzers via ONNX Runtime's native WebGPU plugin execution provider (Dawn -> D3D12/Vulkan/Metal). |
|
|
Themis.Inference.WebGpu
Optional ONNX Runtime WebGPU plugin integration for Themis on Linux x64. |
|
|
Darkspyre.Inference.Tensor.Embedding.Gemma
Resident EmbeddingGemma text and image inference through ONNX Runtime CPU and WebGPU. |
|
|
Darkspyre.Inference.Tensor.Registry
Registration, validation and ordered discovery of the Darkspyre Tensor engine implementations. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Microsoft.ML.OnnxRuntime.EP.WebGpu:
| Repository | Stars |
|---|---|
|
BobLd/RapidOcrNet
Cross-platform OCR processing using PaddleOCR ONNX models (v4 / v5 / v6). Based on RapidAI's RapidOCR
|