Microsoft.ML.OnnxRuntime.EP.WebGpu
0.3.0
Prefix Reserved
dotnet add package Microsoft.ML.OnnxRuntime.EP.WebGpu --version 0.3.0
NuGet\Install-Package Microsoft.ML.OnnxRuntime.EP.WebGpu -Version 0.3.0
<PackageReference Include="Microsoft.ML.OnnxRuntime.EP.WebGpu" Version="0.3.0" />
<PackageVersion Include="Microsoft.ML.OnnxRuntime.EP.WebGpu" Version="0.3.0" />
<PackageReference Include="Microsoft.ML.OnnxRuntime.EP.WebGpu" />
paket add Microsoft.ML.OnnxRuntime.EP.WebGpu --version 0.3.0
#r "nuget: Microsoft.ML.OnnxRuntime.EP.WebGpu, 0.3.0"
#:package Microsoft.ML.OnnxRuntime.EP.WebGpu@0.3.0
#addin nuget:?package=Microsoft.ML.OnnxRuntime.EP.WebGpu&version=0.3.0
#tool nuget:?package=Microsoft.ML.OnnxRuntime.EP.WebGpu&version=0.3.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.
Supported Platforms
| Runtime Identifier (RID) |
|---|
| win-x64 |
| win-arm64 |
| linux-x64 |
| 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 (1)
Showing the top 1 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). |
GitHub repositories
This package is not used by any popular GitHub repositories.