onnxruntime
245118a8 - [CUDA Plugin EP] Add NuGet packaging pipeline (#28378)

Commit
7 days ago
[CUDA Plugin EP] Add NuGet packaging pipeline (#28378) ### Description This PR adds C#/.NET (NuGet) packaging support for the CUDA plugin Execution Provider, following the pattern established by the WebGPU plugin EP NuGet packaging (PR #28313). It introduces a new NuGet package (`Microsoft.ML.OnnxRuntime.EP.Cuda`), the packaging pipeline stage, and a CI test that validates the produced package on a GPU agent. ### Motivation and Context Create CUDA plugin EP NuGet package to enable C#/.NET consumers to use the CUDA plugin EP via NuGet, complementing the existing Python wheel distribution. ### Key Changes **C#/.NET Package Infrastructure (`plugin-ep-cuda/csharp/`):** - `Microsoft.ML.OnnxRuntime.EP.Cuda/` — NuGet package project (netstandard2.0) with `CudaEp.cs` helper class for native library path resolution and EP name retrieval - `pack_nuget.py` — Staging and packing script supporting `--build-only`/`--pack-only` phases for the CI ESRP signing workflow - `test/CudaEpNuGetTest/` — Test console app that registers the EP, runs inference on a Mul model, and validates output **Pipeline Changes:** - `plugin-cuda-nuget-packaging-stage.yml` — New NuGet packaging stage that downloads platform artifacts, builds managed DLL, ESRP-signs it, packs the NuGet, and signs the .nupkg - `plugin-cuda-packaging-stage.yml` — Updated to include the NuGet packaging stage after platform builds - `plugin-win-cuda-test-stage.yml` — Added `Win_plugin_cuda_nuget_Test` job that downloads the NuGet package, sets up a local feed, builds and runs the test project on a GPU agent **Supported Platforms:** | RID | Native Binary | |---|---| | `win-x64` | `onnxruntime_providers_cuda_plugin.dll` | | `linux-x64` | `libonnxruntime_providers_cuda_plugin.so` | | `linux-arm64` | `libonnxruntime_providers_cuda_plugin.so` | ### Related PRs - #28313 — WebGPU plugin EP NuGet packaging (pattern reference) - #28375 — C# tests for CUDA Plugin EP (EP name reference: `CudaPluginExecutionProvider`)
Author
Parents
Loading