LightStudio.Onnx
1.30.0.3
dotnet add package LightStudio.Onnx --version 1.30.0.3
NuGet\Install-Package LightStudio.Onnx -Version 1.30.0.3
<PackageReference Include="LightStudio.Onnx" Version="1.30.0.3" />
<PackageVersion Include="LightStudio.Onnx" Version="1.30.0.3" />
<PackageReference Include="LightStudio.Onnx" />
paket add LightStudio.Onnx --version 1.30.0.3
#r "nuget: LightStudio.Onnx, 1.30.0.3"
#:package LightStudio.Onnx@1.30.0.3
#addin nuget:?package=LightStudio.Onnx&version=1.30.0.3
#tool nuget:?package=LightStudio.Onnx&version=1.30.0.3
LightStudio.Onnx
ONNX Runtime 1.30.0 with the complete upstream .NET managed API, embedded
Dawn/WebGPU on Linux, and CoreML on macOS. Add only LightStudio.Onnx;
do not also reference
Microsoft.ML.OnnxRuntime, .Managed, or .EP.WebGpu.
On Linux, enable WebGPU explicitly:
using Microsoft.ML.OnnxRuntime;
using var options = new SessionOptions();
options.AppendExecutionProvider("WebGPU", new Dictionary<string, string>
{
["preferredLayout"] = "NHWC"
});
using var session = new InferenceSession("model.onnx", options);
The standard namespaces, InferenceSession, DenseTensor<T>, OrtValue, I/O
binding, metadata, and profiling APIs are preserved. Accelerator selection is
explicit; an unconfigured session uses CPU. Unsupported operators may fall back
to CPU. Use options.AddSessionConfigEntry("session.disable_cpu_ep_fallback", "1")
when CPU fallback must be rejected. WebGPU graph capture is opt-in and requires
static shapes. Native training, CUDA, and ROCm are not enabled.
Platform Providers
For macOS, use the generic CoreML API with the unchanged upstream desktop
assemblies. The legacy AppendExecutionProvider_CoreML helper is conditional in
upstream managed builds.
options.AppendExecutionProvider("CoreML", new Dictionary<string, string>
{
["ModelFormat"] = "MLProgram",
["MLComputeUnits"] = "ALL"
});
CoreML falls back to CPU for unsupported operators by default. Acceleration depends on device capabilities and operator support; enabling CoreML does not guarantee GPU or NPU execution.
Platforms
| RIDs | Execution providers | Requirements |
|---|---|---|
linux-x64, linux-arm64 |
CPU, WebGPU | glibc 2.39 baseline; compatible Vulkan driver/loader for WebGPU |
osx-x64, osx-arm64 |
CPU, CoreML | macOS 15 or later |
Dawn is embedded in the Linux runtime library. The macOS runtime includes CoreML
integration using macOS system APIs. The OS, graphics driver, Vulkan loader
(Linux WebGPU), and macOS system C++ runtime remain system prerequisites.
Telemetry is disabled. Standard framework dependencies
System.Memory and System.Numerics.Tensors remain normal NuGet dependencies.
Managed assets cover .NET Standard 2.0 and .NET 8+. Mobile platforms, musl RIDs, and static macOS linking are not included.
Browser Decision
browser-wasm is intentionally omitted, including both thread flavors. ORT's
browser WebGPU implementation relies on asynchronous JavaScript and Asyncify/JSPI
for adapter creation, device creation, and buffer readback. Its supported ORT Web
API is asynchronous JavaScript, not the synchronous managed InferenceSession
API. Shipping archives alone would not provide a supported threaded .NET bridge.
This does not mean that WebGPU or ORT Web generally lack browser threading.
Sources And Licensing
Native sources are pinned to ONNX Runtime commit
f2c39fe2f838cf35ce7da92824f5a5e3ee6e88a7. Dawn and other dependencies use its
pinned dependency manifest. The official 1.30.0 managed assemblies are included
unchanged, with no Microsoft ONNX Runtime package dependency in the final NuGet.
Upstream and dependency notices are included under licenses/.
Build a native RID with bash scripts/build-onnx.sh <rid>, then pack after all
four native outputs are present:
dotnet pack package/onnx/LightStudio.Onnx.csproj -c Release -o artifacts/packages
For local testing only, a deliberately partial prerelease can be built with
-p:OnnxRuntimeIdentifiers=linux-x64 -p:OnnxAllowPartialPackage=true -p:PackageVersion=1.30.0-local.1. Such a package is not the all-platform release.
Use the pinned Linux Dockerfile for release builds; compiling directly on a newer
distribution can raise the glibc requirement. The GitHub Actions workflow builds
all four RIDs on onnx-v* tags or manual dispatch, validates native dependencies
and .NET consumers, and uploads the complete package. Only manual dispatch with
publish=true pushes to NuGet.org using NUGET_API_KEY.
| 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 is compatible. 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
- System.Memory (>= 4.5.5)
-
net8.0
- System.Memory (>= 4.5.5)
- System.Numerics.Tensors (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|