Repository navigation
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Removes the legacy provider-bridge NvTensorRTRTX EP and shifts perftest support to externally registered NVIDIA plugin EPs.
Changes:
- Removes legacy EP implementation, build flags, bindings, packaging, and tests.
- Adds plugin NVIDIA device detection and external sync-stream handling to perftest.
- Removes perftest’s CUDA runtime dependency for CPU-only plugin builds.
Reviewed changes
Copilot reviewed 74 out of 76 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tools/ci_build/gen_def.py |
Removes legacy provider exports. |
tools/ci_build/build.py |
Removes NvTensorRTRTX build/package handling. |
tools/ci_build/build_args.py |
Removes legacy build arguments. |
setup.py |
Removes TRT RTX wheel packaging. |
onnxruntime/test/util/include/default_providers.h |
Removes default provider declaration. |
onnxruntime/test/util/default_providers.cc |
Removes default provider factory. |
onnxruntime/test/unittest_util/base_tester.cc |
Removes legacy EP test routing. |
onnxruntime/test/shared_lib/test_session_options.cc |
Removes provider-interface test. |
onnxruntime/test/python/onnxruntime_test_python_nv_tensorrt_rtx_ep_tests.py |
Deletes Python EP tests. |
onnxruntime/test/providers/tensorrt/tensorrt_basic_test.cc |
Removes NvRTX-specific context test. |
onnxruntime/test/providers/nv_tensorrt_rtx/test_nv_trt_rtx_ep_util.h |
Deletes test utilities. |
onnxruntime/test/providers/nv_tensorrt_rtx/nv_options_test.cc |
Deletes option tests. |
onnxruntime/test/providers/nv_tensorrt_rtx/nv_ep_context_test.cc |
Deletes context-model tests. |
onnxruntime/test/providers/nv_tensorrt_rtx/nv_basic_test.cc |
Deletes provider tests. |
onnxruntime/test/providers/nv_tensorrt_rtx/nv_basic_ort_interop_test.cc |
Deletes interop tests. |
onnxruntime/test/providers/cpu/nn/pool_op_test.cc |
Removes legacy EP exclusions. |
onnxruntime/test/providers/cpu/nn/deform_conv_op_test.cc |
Removes legacy EP exclusions. |
onnxruntime/test/perftest/utils.h |
Adds optional plugin sync stream. |
onnxruntime/test/perftest/ort_test_session.h |
Stores environment and plugin stream. |
onnxruntime/test/perftest/ort_test_session.cc |
Adds NVIDIA plugin I/O binding support. |
onnxruntime/test/perftest/common_utils.cc |
Passes streams through plugin options. |
onnxruntime/test/perftest/command_args_parser.cc |
Removes legacy provider CLI option. |
onnxruntime/test/common/cuda_op_test_utils.cc |
Removes legacy CUDA gating. |
onnxruntime/test/autoep/library/example_plugin_ep/ep_custom_op.h |
Generalizes plugin documentation. |
onnxruntime/python/onnxruntime_pybind_state.cc |
Removes legacy Python registration. |
onnxruntime/python/onnxruntime_pybind_state_common.h |
Removes provider includes/interfaces. |
onnxruntime/python/onnxruntime_pybind_schema.cc |
Removes provider schema factory. |
onnxruntime/python/onnxruntime_inference_collection.py |
Removes legacy fallback handling. |
onnxruntime/core/session/provider_registration.cc |
Removes legacy provider registration. |
onnxruntime/core/session/provider_bridge_ort.cc |
Removes provider-bridge integration. |
onnxruntime/core/session/inference_session.cc |
Removes provider-specific fusion enablement. |
onnxruntime/core/providers/webgpu/webgpu_provider_factory.cc |
Removes obsolete provider reference. |
onnxruntime/core/providers/shared_library/provider_api.h |
Removes legacy provider identifier. |
onnxruntime/core/providers/provider_factory_creators.h |
Removes legacy factory include. |
onnxruntime/core/providers/nv_tensorrt_rtx/version_script.lds |
Deletes export script. |
onnxruntime/core/providers/nv_tensorrt_rtx/symbols.txt |
Deletes symbol metadata. |
onnxruntime/core/providers/nv_tensorrt_rtx/symbols.def |
Deletes Windows exports. |
onnxruntime/core/providers/nv_tensorrt_rtx/onnx_ctx_model_helper.h |
Deletes context helper API. |
onnxruntime/core/providers/nv_tensorrt_rtx/onnx_ctx_model_helper.cc |
Deletes context helper implementation. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_scoped_context.h |
Deletes CUDA context helper. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_provider_factory.h |
Deletes provider interface. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_provider_factory_creator.h |
Deletes factory creator. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_platform_utils.h |
Deletes platform utilities. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_includes.h |
Deletes TensorRT include wrapper. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_file_utils.h |
Deletes file utilities. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_execution_provider_utils.h |
Deletes provider utilities. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_execution_provider_info.h |
Deletes provider configuration. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_execution_provider_info.cc |
Deletes option parsing. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_execution_provider_helper.cc |
Deletes graph helpers. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_execution_provider_custom_ops.h |
Deletes custom-op API. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_execution_provider_custom_ops.cc |
Deletes custom-op implementation. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_data_transfer.h |
Deletes data-transfer API. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_data_transfer.cc |
Deletes CUDA transfers. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_cuda_call.cc |
Deletes CUDA error handling. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_allocator.h |
Deletes allocator API. |
onnxruntime/core/providers/nv_tensorrt_rtx/nv_allocator.cc |
Deletes allocator implementation. |
onnxruntime/core/providers/nv_tensorrt_rtx/exported_symbols.lst |
Deletes Apple exports. |
onnxruntime/core/providers/get_execution_providers.cc |
Removes provider availability entry. |
java/build.gradle |
Removes legacy build definition. |
include/onnxruntime/core/session/onnxruntime_session_options_config_keys.h |
Removes obsolete provider note. |
include/onnxruntime/core/session/onnxruntime_c_api.h |
Removes legacy public option type. |
include/onnxruntime/core/providers/nv_tensorrt_rtx/nv_provider_options.h |
Deletes public provider options. |
include/onnxruntime/core/graph/constants.h |
Removes provider constant. |
docs/CUDA_cuDNN_Optional_Design.md |
Removes obsolete design references. |
cmake/onnxruntime_unittests.cmake |
Removes legacy test/link wiring. |
cmake/onnxruntime_python.cmake |
Removes Python package copying. |
cmake/onnxruntime_providers.cmake |
Removes provider CMake inclusion. |
cmake/onnxruntime_providers_nv.cmake |
Deletes provider build definition. |
cmake/onnxruntime_framework.cmake |
Removes legacy CUDA dependency condition. |
cmake/CMakeLists.txt |
Removes legacy CMake options and flags. |
Suppressed comments (2)
onnxruntime/test/perftest/ort_test_session.cc:130
- When
-gis used with registered plugin EPs but none of the selected EPs is an NVIDIA GPU,ext_stream_remains empty, yet this passes its address.AppendPluginExecutionProvidersthen callsGetHandle(), andSyncStream_GetHandledereferences the null underlyingOrtSyncStream, causing a crash. Pass the pointer only when stream creation succeeded.
onnxruntime/test/perftest/ort_test_session.cc:125 - This chooses the first NVIDIA GPU device in the entire environment, not the device(s) selected later by
--select_ep_devices/--filter_ep_devices. On a multi-GPU EP, selecting GPU 1 can therefore create a GPU 0 stream and pass it to the GPU 1 EP instance (and multiple NVIDIA plugin EPs can receive a stream owned by a different EP), leading to invalid cross-device/EP stream usage. Create streams from the exact selectedOrtEpDeviceset and either maintain one per EP/device or reject unsupported multi-device combinations.
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
42a986a to
f844509
Compare
|
adrastogi Could you help in reviewing this? thanks |
|
devang-ml Scott McKay (@skottmckay) is there any compatibility guidance or process from the ORT team as it relates to deprecation / removal of in-tree EPs? The NVIDIA folks want to remove their provider bridge EP code, and I wanted to double-check if there's any lifecycle process to follow (e.g., any broad comms that need to go out to community mailing lists, doc updates, etc.) or if it's ok to just remove the code. |
ba5c3fc to
17d8257
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…n ep, add autoep test coverage for graphics interop
…on option for trtrtx plugin ep Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
17d8257 to
bfd4921
Compare
|
adrastogi Could you help in reviewing this again and merging if the compatibility changes are fine? |
Tianlei Wu (tianleiwu)
left a comment
There was a problem hiding this comment.
Overall this is a clean removal of the legacy provider-bridge NvTensorRTRTXExecutionProvider and nice addition of autoep graphics interop tests.
A few follow-up items noted inline (for plugin EP -g I/O binding in onnxruntime_perf_test, Python InferenceSession provider fallback/validation when NvTensorRTRTXExecutionProvider is registered as a plugin EP, and unused vulkan_headers in cmake/deps.txt), plus one cleanup in an untouched header:
- In
onnxruntime/core/providers/cuda/shared_inc/cuda_call.h(lines 19 and 30),CU_CALLandCU_CALL_THROWwere added in #26948 for the legacy NV EP and relied on theCudaErrString<CUresult>specialization andCudaCall<CUresult, ...>explicit template instantiations in the deletedonnxruntime/core/providers/nv_tensorrt_rtx/nv_cuda_call.cc. Neitheronnxruntime/core/providers/cuda/cuda_call.ccnoronnxruntime/core/providers/tensorrt/cuda_call.ccinstantiatesCudaCall<CUresult, ...>, leaving those macros without a backing definition.
- perftest: keep run-end synchronization for plugin EP IO binding, skip unused outputs_ pre-allocation, and bind string outputs to host memory. - python: restore TensorRT/NvTensorRTRTX mutual-exclusion check and CUDA fallback handling for the plugin EP. - Remove unused vulkan_headers dependency and CU_CALL/CU_CALL_THROW macros that lost their backing definitions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…for removed EP name, and restore NV RTX test exclusions
|
Thanks for the update. Following two issues might need to address as well.
|
Chi Lo (@chilo-ms) Addressed the 2nd issue in latest commit, thank you. For the first issue, The missing completion barrier is in the WebGPU EP and doesn't depend on -g. The plugin -g path intentionally does not set disable_synchronize_execution_providers, so Run() still calls OnRunEnd(sync_stream=true) and stream cleanup with sync, exactly as the non--g path does. SynchronizeOutputs() is an extra wait on top, through OrtEp::Sync when the EP implements it. WebGPU skips both: OnRunEnd ignores sync_stream and only flushes, its sync stream's OnSessionRunEnd is a no-op, and it doesn't implement OrtEp::Sync. So WebGPU timings stop at submission whether or not -g is used. The NV TensorRT RTX plugin EP doesn't implement OrtEp::Sync but synchronizes its stream at run end when sync_stream is set, so timings include device execution with or without -g. The fix belongs in the WebGPU EP: honour sync_stream in OnRunEnd (e.g. via FlushAndWaitChecked), and/or implement OrtEp::Sync |
Tianlei Wu (tianleiwu)
left a comment
There was a problem hiding this comment.
Thanks for the cleanup. The removal is thorough: at this head git grep for the removed symbols only finds the intentional leftovers (the NvTensorRtRtxProviderOptions typedef, kNvTensorRTRTXExecutionProvider, and the DQ → MatMulNBits EP-name check), the branch merges cleanly with current main, and the earlier review threads are addressed.
One item to fix before merge: Android CI / AndroidBinarySizeCheckJob_MinimalBaseline is the only failing check, and it is caused by the new deprecation branch in provider_registration.cc (numbers and a suggested fix inline). Compiling that branch out of minimal builds, together with its test, should turn it green and makes this PR a net size reduction for that build.
On the WebGPU -g timing discussion above (not a new finding): I agree the fix belongs in the WebGPU EP (honour sync_stream in OnRunEnd and/or implement OrtEp::Sync) and don't see it as a blocker for this PR. One nuance for that thread: without -g, the output copy to the host (BufferManager::Download, which blocks on MapAsync) is already an implicit completion barrier, so it is the -g IO-binding path that removes it. Until the WebGPU change lands, -g timings for that EP are submit-only, so it is worth tracking as a follow-up.
| // The provider-bridge NvTensorRtRtx EP is deprecated. Report the plugin EP flow with the deprecation error | ||
| if (strcmp(provider_name, "NvTensorRtRtx") == 0 || strcmp(provider_name, kNvTensorRTRTXExecutionProvider) == 0) { | ||
| return OrtApis::CreateStatus( | ||
| ORT_INVALID_ARGUMENT, | ||
| (std::string("The '") + provider_name + | ||
| "' execution provider is no longer built into ONNX Runtime. Use the NVIDIA TensorRT RTX plugin EP " | ||
| "instead: register its library with RegisterExecutionProviderLibrary, select an OrtEpDevice from " | ||
| "GetEpDevices, and append it with SessionOptionsAppendExecutionProvider_V2.") | ||
| .c_str()); | ||
| } |
There was a problem hiding this comment.
This new branch is what pushes Android CI / AndroidBinarySizeCheckJob_MinimalBaseline over its gate (the only failing check on this head).
-
The job reports
Sections total=1607810againstBINARY_SIZE_THRESHOLD_IN_BYTES=1607680(android.ymlL82), i.e. 130 B over. Recentmainruns of the same job measure 1,607,426–1,607,458 B, so this PR adds roughly +350–380 B. -
provider_registration.ccis compiled into minimal builds (onlyprovider_bridge_ort.ccis excluded), and the provider-bridge NV EP never existed there. The ~270 B of message literals plus thestd::stringconcatenation and twostrcmps are pure growth for that build. -
A translation-unit A/B build of this file (x86-64 g++,
-Os -fno-exceptions -fno-rtti -DORT_MINIMAL_BUILD -DORT_NO_EXCEPTIONS, flags taken from the minimal-buildonnxruntime_sessiontarget; approximate, the arm64 CI number is authoritative), allocated size vs the merge base:Variant Δ size this PR as-is +428 B deprecation branch compiled out −85 B short static message, no std::string+147 B So the removal on its own is a net shrink, and this branch is what tips the gate.
Suggested fix: compile the branch, and the test that exercises it, out of minimal builds. Those builds then report Unknown provider name 'NvTensorRtRtx' …, which is accurate since they never carried this EP.
#if !defined(ORT_MINIMAL_BUILD)
// The provider-bridge NvTensorRtRtx EP is deprecated. Report the plugin EP flow with the deprecation error
if (strcmp(provider_name, "NvTensorRtRtx") == 0 || strcmp(provider_name, kNvTensorRTRTXExecutionProvider) == 0) {
// ... existing CreateStatus(...) ...
}
#endif // !defined(ORT_MINIMAL_BUILD)and the same #if !defined(ORT_MINIMAL_BUILD) / #endif around CApiTest.session_options_append_removed_nv_tensorrt_rtx_ep in test_session_options.cc.
Alternatives, if you want the message in minimal builds: shrink it to a short static literal (about +147 B, which should fit but leaves little margin against main's ~220 B of headroom), or bump the threshold in android.yml (precedent: #33164).
There was a problem hiding this comment.
Added minimal build guard to the deprecation branch and its related test, please check the pipelines. Thanks!


Description
Motivation and Context
https://github.com/NVIDIA/TensorRT-RTX-EP-ABI plugin EP is the preferred path for TRT RTX EP.