Remove hard core ORT dependency from CUDA plugin EP packages#28992
Merged
tianleiwu merged 1 commit intoJun 11, 2026
Merged
Conversation
edgchen1
reviewed
Jun 10, 2026
edgchen1
approved these changes
Jun 10, 2026
25d37c3
into
tlwu/20260605/cuda_plugin_min_ort_version
6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The CUDA plugin EP packages (
onnxruntime-ep-cuda12/onnxruntime-ep-cuda13wheels and theMicrosoft.ML.OnnxRuntime.EP.CudaNuGet package) currently declare a hard dependency on the coreonnxruntimepackage. That is wrong foronnxruntime-gpuusers, who would otherwise be forced to pull inthe CPU
onnxruntime/Microsoft.ML.OnnxRuntimepackage. This change drops the hard dependency from bothpackages, documents the core-package prerequisite in the READMEs, and installs/pins the core ORT package
explicitly in CI — mirroring what was done for the WebGPU plugin EP in #28384.
The minimum compatible ORT version remains the single source of truth in
plugin-ep-cuda/MIN_ONNXRUNTIME_VERSION; it is now injected intoeach package's README at build/pack time, and the native plugin EP validates compatibility at registration
time.
Summary of Changes
Python wheel
plugin-ep-cuda/python/pyproject.toml.independencies = ["onnxruntime>=..."]block.plugin-ep-cuda/python/build_wheel.pygen_file_from_templatehelper; render the staged package README with the minimum ORT version; stop injecting the version intopyproject.toml.plugin-ep-cuda/python/onnxruntime_ep_cuda/README.mdpip install "onnxruntime>=@min_onnxruntime_version@"step.C# NuGet package
plugin-ep-cuda/csharp/Microsoft.ML.OnnxRuntime.EP.Cuda/Microsoft.ML.OnnxRuntime.EP.Cuda.csprojOnnxRuntimeMinVersionresolution/validation machinery and the hardMicrosoft.ML.OnnxRuntimePackageReference.plugin-ep-cuda/csharp/Microsoft.ML.OnnxRuntime.EP.Cuda/README.mdplugin-ep-cuda/csharp/pack_nuget.py-p:OnnxRuntimeMinVersionFileplumbing fromdotnet build/pack.Shared / docs
plugin-ep-cuda/_packaging_utils.pygen_file_from_templatehelper (matches the WebGPU plugin's utility).plugin-ep-cuda/README.mdTests & CI
plugin-ep-cuda/csharp/test/CudaEpNuGetTest/CudaEpNuGetTest.csprojMicrosoft.ML.OnnxRuntimepackage explicitly via$(OrtCoreTestVersion)(no longer transitively pulled in).tools/ci_build/github/azure-pipelines/stages/plugin-linux-cuda-test-stage.yml--no-depsinstall flag and updated the comment.tools/ci_build/github/azure-pipelines/stages/plugin-win-cuda-test-stage.ymlOrtCoreTestVersionfromMIN_ONNXRUNTIME_VERSIONand pass it todotnet build.Testing
python -m ruff checkandlintrunnerpass on the changed files.python -m py_compile).onnxruntimepackage explicitly and verifythe plugin wheel installs without altering the pinned core version; the NuGet test project references the
core package explicitly and pins it to the minimum supported version.
Motivation and Context
Follow-up to PR #28824 (CUDA plugin EP minimum ORT version / version-gated callbacks), kept separate to keep
that PR focused on the version-gating change. Mirrors the WebGPU plugin EP packaging change in #28384. The
CUDA case is stronger: a hard dependency on the CPU
onnxruntimepackage is incorrect foronnxruntime-gpuusers.
Checklist