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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.ML.OnnxRuntime.EP.WebGpu" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.ML.OnnxRuntime.EP.WebGpu" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.ML.OnnxRuntime.EP.WebGpu" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.ML.OnnxRuntime.EP.WebGpu --version 0.3.0
                    
#r "nuget: Microsoft.ML.OnnxRuntime.EP.WebGpu, 0.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Microsoft.ML.OnnxRuntime.EP.WebGpu@0.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.ML.OnnxRuntime.EP.WebGpu&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.ML.OnnxRuntime.EP.WebGpu&version=0.3.0
                    
Install as a Cake Tool

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 referenced Microsoft.ML.OnnxRuntime package is older than 1.24.4. Upgrade with dotnet add package Microsoft.ML.OnnxRuntime --version 1.24.4.
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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.

Version Downloads Last Updated
0.3.0 300 8/24/2026
0.2.1 684 7/29/2026
0.1.0 793 5/27/2026