From 0ab599626310cfa491d46afb5ba933ecd37bb9eb Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Mon, 15 Jun 2026 14:17:46 -0700 Subject: [PATCH 01/10] add cuda graph support --- src/cuda_graph.cc | 127 ++++++++++++++++++++++++++ src/cuda_graph.h | 67 ++++++++++++++ src/tensorrt_execution_provider.cc | 142 +++++++++++++++-------------- src/tensorrt_execution_provider.h | 65 +++++++++---- 4 files changed, 318 insertions(+), 83 deletions(-) create mode 100644 src/cuda_graph.cc create mode 100644 src/cuda_graph.h diff --git a/src/cuda_graph.cc b/src/cuda_graph.cc new file mode 100644 index 0000000..7ef23d4 --- /dev/null +++ b/src/cuda_graph.cc @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#include "cuda_graph.h" + +#include +#include + +namespace trt_ep { + +CudaGraphSet::~CudaGraphSet() { + Clear(); +} + +void CudaGraphSet::Clear() { + for (auto& it : cuda_graphs_) { + cudaGraphExecDestroy(it.second); + } + cuda_graphs_.clear(); +} + +bool CudaGraphSet::Contains(CudaGraphAnnotation_t cuda_graph_annotation_id) const { + return cuda_graphs_.find(cuda_graph_annotation_id) != cuda_graphs_.end(); +} + +void CudaGraphSet::Put(CudaGraphAnnotation_t cuda_graph_annotation_id, cudaGraphExec_t graph_exec) { + if (Contains(cuda_graph_annotation_id)) { + THROW("CUDA graph annotation id ", cuda_graph_annotation_id, " already exists."); + } + cuda_graphs_.emplace(cuda_graph_annotation_id, graph_exec); +} + +cudaGraphExec_t CudaGraphSet::Get(CudaGraphAnnotation_t cuda_graph_annotation_id) const { + if (!Contains(cuda_graph_annotation_id)) { + THROW("CUDA graph annotation id ", cuda_graph_annotation_id, " not found."); + } + return cuda_graphs_.at(cuda_graph_annotation_id); +} + +CudaGraphManager::CudaGraphManager(cudaStream_t stream) : stream_(stream) { +} + +void CudaGraphManager::SetStream(cudaStream_t stream) { + stream_ = stream; +} + +void CudaGraphManager::CaptureBegin(CudaGraphAnnotation_t cuda_graph_annotation_id) { + if (!IsGraphCaptureAllowedOnRun(cuda_graph_annotation_id)) { + THROW("CUDA graph capture is not allowed on this run."); + } + + if (cuda_graph_set_.Contains(cuda_graph_annotation_id)) { + THROW("Trying to capture a graph with annotation id ", cuda_graph_annotation_id, + " that already used. Please use a different annotation id."); + } + + CUDA_CALL_THROW(cudaStreamSynchronize(stream_)); + // Use cudaStreamCaptureModeThreadLocal to support multiple threads with + // multiple graphs and streams (aligned with CUDA plugin EP). + CUDA_CALL_THROW(cudaStreamBeginCapture(stream_, cudaStreamCaptureModeThreadLocal)); +} + +void CudaGraphManager::CaptureEnd(CudaGraphAnnotation_t cuda_graph_annotation_id) { + cudaGraph_t graph = nullptr; + CUDA_CALL_THROW(cudaStreamEndCapture(stream_, &graph)); + if (graph == nullptr) { + THROW("CudaGraphManager::CaptureEnd: graph is NULL"); + } + + cudaGraphExec_t graph_exec = nullptr; + cudaError_t instantiate_err = cudaGraphInstantiate(&graph_exec, graph, 0); + // Always destroy the graph definition, even if instantiate failed. + cudaError_t destroy_err = cudaGraphDestroy(graph); + + if (instantiate_err != cudaSuccess) { + THROW("cudaGraphInstantiate failed: ", cudaGetErrorString(instantiate_err)); + } + if (destroy_err != cudaSuccess) { + THROW("cudaGraphDestroy failed: ", cudaGetErrorString(destroy_err)); + } + + cuda_graph_set_.Put(cuda_graph_annotation_id, graph_exec); +} + +OrtStatus* CudaGraphManager::Replay(CudaGraphAnnotation_t cuda_graph_annotation_id, bool sync) { + cudaGraphExec_t graph_exec = cuda_graph_set_.Get(cuda_graph_annotation_id); + RETURN_IF_ERROR(CUDA_CALL(cudaGraphLaunch(graph_exec, stream_))); + if (sync) { + RETURN_IF_ERROR(CUDA_CALL(cudaStreamSynchronize(stream_))); + } + return nullptr; +} + +bool CudaGraphManager::IsGraphCaptureAllowedOnRun(CudaGraphAnnotation_t cuda_graph_annotation_id) const { + return cuda_graph_annotation_id != kCudaGraphAnnotationSkip; +} + +bool CudaGraphManager::IsGraphCaptured(CudaGraphAnnotation_t cuda_graph_annotation_id) const { + return cuda_graph_set_.Contains(cuda_graph_annotation_id); +} + +bool CudaGraphManager::IsGraphCaptureAllowed(CudaGraphAnnotation_t cuda_graph_annotation_id, int min_runs) const { + if (!IsGraphCaptureAllowedOnRun(cuda_graph_annotation_id)) { + return false; + } + auto it = run_count_.find(cuda_graph_annotation_id); + if (it == run_count_.end()) { + return false; + } + return it->second >= min_runs; +} + +void CudaGraphManager::IncrementRegularRunCount(CudaGraphAnnotation_t cuda_graph_annotation_id) { + auto& count = run_count_[cuda_graph_annotation_id]; + count++; +} + +void CudaGraphManager::Reset() { + cuda_graph_set_.Clear(); + run_count_.clear(); +} + +CudaGraphManager::~CudaGraphManager() { + Reset(); +} + +} // namespace trt_ep diff --git a/src/cuda_graph.h b/src/cuda_graph.h new file mode 100644 index 0000000..506b32e --- /dev/null +++ b/src/cuda_graph.h @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// Plugin-side CUDA graph manager. Manages cudaGraph_t / cudaGraphExec_t lifecycle +// for CUDA graph capture and replay in the plugin EP. Aligned with the CUDA plugin EP +// CudaGraphManager implementation. + +#pragma once + +#include + +#include + +#include "utils/ep_utils.h" +#include "utils/cuda/cuda_call.h" + +namespace trt_ep { + +using CudaGraphAnnotation_t = int; + +constexpr CudaGraphAnnotation_t kCudaGraphAnnotationSkip = -1; +constexpr CudaGraphAnnotation_t kCudaGraphAnnotationDefault = 0; + +// Storage for captured CUDA graph executables, keyed by annotation ID. +class CudaGraphSet { + public: + CudaGraphSet() = default; + ~CudaGraphSet(); + + void Clear(); + bool Contains(CudaGraphAnnotation_t cuda_graph_annotation_id) const; + void Put(CudaGraphAnnotation_t cuda_graph_annotation_id, cudaGraphExec_t graph_exec); + cudaGraphExec_t Get(CudaGraphAnnotation_t cuda_graph_annotation_id) const; + + private: + std::unordered_map cuda_graphs_; +}; + +// Orchestrates CUDA graph capture, instantiation, and replay. +// Aligned with onnxruntime::cuda_plugin::CudaGraphManager. +class CudaGraphManager { + public: + CudaGraphManager() = default; + explicit CudaGraphManager(cudaStream_t stream); + ~CudaGraphManager(); + + void SetStream(cudaStream_t stream); + void CaptureBegin(CudaGraphAnnotation_t cuda_graph_annotation_id); + void CaptureEnd(CudaGraphAnnotation_t cuda_graph_annotation_id); + OrtStatus* Replay(CudaGraphAnnotation_t cuda_graph_annotation_id, bool sync = true); + + void Reset(); + + bool IsGraphCaptureAllowedOnRun(CudaGraphAnnotation_t cuda_graph_annotation_id) const; + bool IsGraphCaptured(CudaGraphAnnotation_t cuda_graph_annotation_id) const; + + // Warm-up tracking: per-annotation run counters + bool IsGraphCaptureAllowed(CudaGraphAnnotation_t cuda_graph_annotation_id, int min_runs) const; + void IncrementRegularRunCount(CudaGraphAnnotation_t cuda_graph_annotation_id); + + private: + CudaGraphSet cuda_graph_set_; + cudaStream_t stream_ = nullptr; + std::unordered_map run_count_; +}; + +} // namespace trt_ep diff --git a/src/tensorrt_execution_provider.cc b/src/tensorrt_execution_provider.cc index d950ce2..c1eaf22 100644 --- a/src/tensorrt_execution_provider.cc +++ b/src/tensorrt_execution_provider.cc @@ -888,7 +888,7 @@ SubGraphCollection_t TensorrtExecutionProvider::GetSupportedList(SubGraphCollect if (!group.first.empty()) { if (group.second) { nodes_list_output.push_back(group); - } else { + } else { std::vector selected_nodes(group.first.size()); size_t i = 0; for (const auto& index : group.first) { @@ -1334,11 +1334,11 @@ OrtStatus* TensorrtExecutionProvider::CreateNodeComputeInfoFromGraph(OrtEp* this auto trt_builder = GetBuilder(trt_logger); auto network_flags = 0; #if NV_TENSORRT_VERSION >= 11 - network_flags |= 0; + network_flags |= 0; #elif NV_TENSORRT_MAJOR > 8 - network_flags |= (fp16_enable_ || int8_enable_ || bf16_enable_) ? 0 : 1U << static_cast(nvinfer1::NetworkDefinitionCreationFlag::kSTRONGLY_TYPED); + network_flags |= (fp16_enable_ || int8_enable_ || bf16_enable_) ? 0 : 1U << static_cast(nvinfer1::NetworkDefinitionCreationFlag::kSTRONGLY_TYPED); #else - network_flags |= 1U << static_cast(nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH); + network_flags |= 1U << static_cast(nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH); #endif auto trt_network = std::unique_ptr(trt_builder->createNetworkV2(network_flags)); auto trt_config = std::unique_ptr(trt_builder->createBuilderConfig()); @@ -3161,6 +3161,7 @@ OrtStatus* TRTEpNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_ptr, void* auto onnx_external_data_bytestream_size = trt_state->onnx_external_data_bytestream_size; auto sync_stream_after_enqueue = trt_state->sync_stream_after_enqueue; + auto cuda_graph_enable = trt_state->cuda_graph_enable; int num_inputs = static_cast(input_indexes.size()); int num_outputs = static_cast(output_indexes.size()); @@ -3172,10 +3173,9 @@ OrtStatus* TRTEpNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_ptr, void* auto& dds_output_allocator_map = dds_output_allocator_maps[fused_node_name]; // Get default OrtMemoryInfo from factory's device cache - const OrtMemoryInfo* mem_info = ep.factory_.GetMemoryInfoByOrdinal(device_id, /* is pinned */false); + const OrtMemoryInfo* mem_info = ep.factory_.GetMemoryInfoByOrdinal(device_id, /* is pinned */ false); if (mem_info == nullptr) { - std::string err_msg = "TensorRT EP failed to get OrtMemoryInfo for device_id " - + std::to_string(device_id) + " from provider factory."; + std::string err_msg = "TensorRT EP failed to get OrtMemoryInfo for device_id " + std::to_string(device_id) + " from provider factory."; return ep.ort_api.CreateStatus(ORT_EP_FAIL, err_msg.c_str()); } @@ -3390,8 +3390,8 @@ OrtStatus* TRTEpNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_ptr, void* #pragma warning(pop) #endif #endif // NV_TENSORRT_MAJOR < 11 - // Set DLA (DLA can only run with FP16 or INT8) - // TRT 11 removed the standalone precision flags; gate DLA on dla_enable alone. + // Set DLA (DLA can only run with FP16 or INT8) + // TRT 11 removed the standalone precision flags; gate DLA on dla_enable alone. #if NV_TENSORRT_MAJOR >= 11 if (trt_state->dla_enable) { #else @@ -3457,18 +3457,18 @@ OrtStatus* TRTEpNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_ptr, void* message.c_str(), ORT_FILE, __LINE__, __FUNCTION__)); } #else - if (trt_state->builder_optimization_level != 3) { - std::string message = "[TensorRT EP] Builder optimization level can only be used on TRT 8.6 onwards!"; - Ort::ThrowOnError(ep.ort_api.Logger_LogMessage(&ep.logger_, - OrtLoggingLevel::ORT_LOGGING_LEVEL_VERBOSE, - message.c_str(), ORT_FILE, __LINE__, __FUNCTION__)); - } - if (trt_state->auxiliary_streams >= 0) { - std::string message = "[TensorRT EP] Auxiliary streams can only be set on TRT 8.6 onwards!"; - Ort::ThrowOnError(ep.ort_api.Logger_LogMessage(&ep.logger_, - OrtLoggingLevel::ORT_LOGGING_LEVEL_VERBOSE, - message.c_str(), ORT_FILE, __LINE__, __FUNCTION__)); - } + if (trt_state->builder_optimization_level != 3) { + std::string message = "[TensorRT EP] Builder optimization level can only be used on TRT 8.6 onwards!"; + Ort::ThrowOnError(ep.ort_api.Logger_LogMessage(&ep.logger_, + OrtLoggingLevel::ORT_LOGGING_LEVEL_VERBOSE, + message.c_str(), ORT_FILE, __LINE__, __FUNCTION__)); + } + if (trt_state->auxiliary_streams >= 0) { + std::string message = "[TensorRT EP] Auxiliary streams can only be set on TRT 8.6 onwards!"; + Ort::ThrowOnError(ep.ort_api.Logger_LogMessage(&ep.logger_, + OrtLoggingLevel::ORT_LOGGING_LEVEL_VERBOSE, + message.c_str(), ORT_FILE, __LINE__, __FUNCTION__)); + } #endif if (weight_stripped_engine_enable) { #if NV_TENSORRT_MAJOR >= 10 @@ -3759,17 +3759,15 @@ OrtStatus* TRTEpNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_ptr, void* trt_context->setDeviceMemory((*context_memory).get()); } - // TODO: Add support for CUDA graph for plugin ep. - /* // Start CUDA graph capture. // Note: The reason we don't put graph capture in OnRunStart() like CUDA EP does is because // current ORT TRT doesn't get cuda stream until compute time and graph capture requires cuda stream. - if (cuda_graph_enable_ && IsGraphCaptureAllowed() && !IsGraphCaptured(0)) { - // LOGS_DEFAULT(INFO) << "Capturing the cuda graph for this model"; - cuda_graph_.SetStream(stream); - CaptureBegin(0); + // We use the default annotation id (0). See tensorrt_execution_provider.h for why TRT EP does not + // support GetGraphAnnotationId(). + if (cuda_graph_enable && ep.IsGraphCaptureAllowed() && !ep.IsGraphCaptured(0)) { + ep.cuda_graph_.SetStream(stream); + ep.CaptureBegin(0); } - */ // Run TRT inference if (!trt_context->enqueueV3(stream)) { @@ -3840,6 +3838,32 @@ OrtStatus* TRTEpNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_ptr, void* } } + // End CUDA graph capture. + // Note: One reason we don't put end of graph capture in OnRunEnd() like CUDA EP does is because of cuda stream + // mentioned in graph capture above, another reason is because OnRunEnd() is not synchronized with OnRunStart() and + // ExecuteGraph() per inference_session.cc. It's safe to start/end CUDA graph capture in compute_func() here since + // cuda graph object is maintained by a per thread basis. + if (cuda_graph_enable && !ep.IsGraphCaptured(0)) { + if (ep.IsGraphCaptureAllowed()) { + ep.CaptureEnd(0); + // CUDA work issued to a capturing stream doesn't actually run on the GPU, + // so run the captured graph here to actually execute the work. + auto replay_status = ep.ReplayGraph(0); + if (replay_status != nullptr) { + return replay_status; + } + } else { + ep.IncrementRegularRunCountBeforeGraphCapture(); + } + } + + if (cuda_graph_enable && ep.IsGraphCaptured(0)) { + auto replay_status = ep.ReplayGraph(0); + if (replay_status != nullptr) { + return replay_status; + } + } + // Unregister DLA tensor addresses so cuDLA releases its cudlaMemRegister // hold on ORT's pooled buffers before the allocator recycles the VA. // setTensorAddress(nullptr) must precede any cudaFree on these pointers. @@ -3852,25 +3876,6 @@ OrtStatus* TRTEpNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_ptr, void* } } - // TODO: Add support for CUDA graph for plugin ep. - /* - // End CUDA graph capture. - // Note: One reason we don't put end of graph capture in OnRunEnd() like CUDA EP does is because of cuda stream - // mentioned in graph capture above, another reason is because OnRunEnd() is not synchronized with OnRunStart() and - // ExecuteGraph() per inference_session.cc. It's safe to start/end CUDA graph capture in compute_func() here since - // cuda graph object is maintained by a per thread basis. - if (cuda_graph_enable_ && !IsGraphCaptured(0)) { - if (IsGraphCaptureAllowed()) { - CaptureEnd(0); - // CUDA work issued to a capturing stream doesn't actually run on the GPU, - // so run the captured graph here to actually execute the work. - ORT_RETURN_IF_ERROR(ReplayGraph(0)); - } else { - IncrementRegularRunCountBeforeGraphCapture(); - } - } - */ - return nullptr; } @@ -3932,16 +3937,16 @@ OrtStatus* TRTEpEpContextNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_p auto max_context_mem_size_ptr = trt_state->max_context_mem_size_ptr; auto context_memory = trt_state->context_memory; auto sync_stream_after_enqueue = trt_state->sync_stream_after_enqueue; + auto cuda_graph_enable = ep.cuda_graph_enable_; int num_outputs = static_cast(output_indexes.size()); std::unordered_map> shape_tensor_values; // This map holds "shape tensor -> shape values" for the shape tensor input across this inference run std::unordered_map> shape_tensor_values_int64; // same as above but for int64 shape tensor input // Get default OrtMemoryInfo from factory's device cache - const OrtMemoryInfo* mem_info = ep.factory_.GetMemoryInfoByOrdinal(device_id, /* is pinned */false); + const OrtMemoryInfo* mem_info = ep.factory_.GetMemoryInfoByOrdinal(device_id, /* is pinned */ false); if (mem_info == nullptr) { - std::string err_msg = "TensorRT EP failed to get OrtMemoryInfo for device_id " - + std::to_string(device_id) + " from provider factory."; - return ep.ort_api.CreateStatus(ORT_EP_FAIL, err_msg.c_str()); + std::string err_msg = "TensorRT EP failed to get OrtMemoryInfo for device_id " + std::to_string(device_id) + " from provider factory."; + return ep.ort_api.CreateStatus(ORT_EP_FAIL, err_msg.c_str()); } // Get allocator from OrtKernelContext @@ -4052,17 +4057,15 @@ OrtStatus* TRTEpEpContextNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_p trt_context->setDeviceMemory((*context_memory).get()); } - // TODO: Add support for CUDA graph for plugin ep. - /* // Start CUDA graph capture. // Note: The reason we don't put graph capture in OnRunStart() like CUDA EP does is because // current ORT TRT doesn't get cuda stream until compute time and graph capture requires cuda stream. - if (cuda_graph_enable_ && IsGraphCaptureAllowed() && !IsGraphCaptured(0)) { - // LOGS_DEFAULT(INFO) << "Capturing the cuda graph for this model"; - cuda_graph_.SetStream(stream); - CaptureBegin(0); + // We use the default annotation id (0). See tensorrt_execution_provider.h for why TRT EP does not + // support GetGraphAnnotationId(). + if (cuda_graph_enable && ep.IsGraphCaptureAllowed() && !ep.IsGraphCaptured(0)) { + ep.cuda_graph_.SetStream(stream); + ep.CaptureBegin(0); } - */ // Run TRT inference if (!trt_context->enqueueV3(stream)) { @@ -4145,24 +4148,31 @@ OrtStatus* TRTEpEpContextNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_p } } - // TODO: Add support for CUDA graph for plugin ep. - /* // End CUDA graph capture. // Note: One reason we don't put end of graph capture in OnRunEnd() like CUDA EP does is because of cuda stream // mentioned in graph capture above, another reason is because OnRunEnd() is not synchronized with OnRunStart() and // ExecuteGraph() per inference_session.cc. It's safe to start/end CUDA graph capture in compute_func() here since // cuda graph object is maintained by a per thread basis. - if (cuda_graph_enable_ && !IsGraphCaptured(0)) { - if (IsGraphCaptureAllowed()) { - CaptureEnd(0); + if (cuda_graph_enable && !ep.IsGraphCaptured(0)) { + if (ep.IsGraphCaptureAllowed()) { + ep.CaptureEnd(0); // CUDA work issued to a capturing stream doesn't actually run on the GPU, // so run the captured graph here to actually execute the work. - ORT_RETURN_IF_ERROR(ReplayGraph(0)); + auto replay_status = ep.ReplayGraph(0); + if (replay_status != nullptr) { + return replay_status; + } } else { - IncrementRegularRunCountBeforeGraphCapture(); + ep.IncrementRegularRunCountBeforeGraphCapture(); + } + } + + if (cuda_graph_enable && ep.IsGraphCaptured(0)) { + auto replay_status = ep.ReplayGraph(0); + if (replay_status != nullptr) { + return replay_status; } } - */ return nullptr; } diff --git a/src/tensorrt_execution_provider.h b/src/tensorrt_execution_provider.h index 7d1c56f..a846fd9 100644 --- a/src/tensorrt_execution_provider.h +++ b/src/tensorrt_execution_provider.h @@ -4,6 +4,7 @@ #include "utils/provider_options.h" #include "tensorrt_execution_provider_info.h" #include "nv_includes.h" +#include "cuda_graph.h" #include #include @@ -259,6 +260,51 @@ struct TensorrtExecutionProvider : public OrtEp, public ApiPtrs { // and should be kept for the lifetime of TRT EP object. OrtAllocator* alloc_ = nullptr; + // CUDA Graph support (aligned with CUDA plugin EP's CudaGraphManager) + // + // Note: Unlike the CUDA plugin EP, TRT EP does not implement GetGraphAnnotationId() to parse + // "gpu_graph_id" from OrtRunOptions for multi-graph support. This is because: + // 1. TRT EP typically fuses the entire model into a single TRT engine (one node), so there is + // usually only one graph to capture (using the default annotation id 0). + // 2. TRT handles dynamic shapes via optimization profiles rather than multiple CUDA graphs. + // 3. The CUDA stream is not available until compute time, so TRT EP captures graphs inside + // compute functions rather than in OnRunStart/OnRunEnd. Passing an annotation id from + // OrtRunOptions would require wiring OnRunStart/OnRunEnd callbacks and storing the id as + // thread-local state, adding complexity without clear benefit for TRT workloads. + // + // Note: Unlike the CUDA plugin EP which creates a dedicated per-thread graph_stream and passes + // it to CudaGraphManager at construction time, TRT EP receives the CUDA stream from ORT at + // compute time (via OrtKernelContext). Therefore, SetStream() must be called before each capture. + bool cuda_graph_enable_ = false; + CudaGraphManager cuda_graph_; + // Warm-up runs before graph capture. TRT EP needs fewer warm-up runs than CUDA EP + // because TRT handles its own memory allocation during engine execution. + const int min_num_runs_before_cuda_graph_capture_ = 1; + + bool IsGraphCaptureAllowed(CudaGraphAnnotation_t graph_annotation_id = kCudaGraphAnnotationDefault) const { + return cuda_graph_.IsGraphCaptureAllowed(graph_annotation_id, min_num_runs_before_cuda_graph_capture_); + } + + bool IsGraphCaptured(CudaGraphAnnotation_t graph_annotation_id = kCudaGraphAnnotationDefault) const { + return cuda_graph_.IsGraphCaptured(graph_annotation_id); + } + + void CaptureBegin(CudaGraphAnnotation_t graph_annotation_id = kCudaGraphAnnotationDefault) { + cuda_graph_.CaptureBegin(graph_annotation_id); + } + + void CaptureEnd(CudaGraphAnnotation_t graph_annotation_id = kCudaGraphAnnotationDefault) { + cuda_graph_.CaptureEnd(graph_annotation_id); + } + + OrtStatus* ReplayGraph(CudaGraphAnnotation_t graph_annotation_id = kCudaGraphAnnotationDefault, bool sync = true) { + return cuda_graph_.Replay(graph_annotation_id, sync); + } + + void IncrementRegularRunCountBeforeGraphCapture(CudaGraphAnnotation_t graph_annotation_id = kCudaGraphAnnotationDefault) { + cuda_graph_.IncrementRegularRunCount(graph_annotation_id); + } + private: static const char* ORT_API_CALL GetNameImpl(const OrtEp* this_ptr) noexcept; static OrtStatus* ORT_API_CALL GetCapabilityImpl(OrtEp* this_ptr, const OrtGraph* graph, @@ -275,8 +321,8 @@ struct TensorrtExecutionProvider : public OrtEp, public ApiPtrs { _Outptr_ OrtSyncStreamImpl** stream) noexcept; static OrtStatus* ORT_API_CALL GetKernelRegistryImpl( - _In_ OrtEp* this_ptr, - _Outptr_result_maybenull_ const OrtKernelRegistry** kernel_registry) noexcept; + _In_ OrtEp* this_ptr, + _Outptr_result_maybenull_ const OrtKernelRegistry** kernel_registry) noexcept; nvonnxparser::OnnxParserFlags ComputeParserFlags() const; @@ -327,7 +373,6 @@ struct TensorrtExecutionProvider : public OrtEp, public ApiPtrs { bool timing_cache_enable_ = false; bool force_timing_cache_match_ = false; bool detailed_build_log_ = false; - bool cuda_graph_enable_ = false; std::string cache_prefix_; bool engine_hw_compatible_ = false; std::string op_types_to_exclude_; @@ -374,20 +419,6 @@ struct TensorrtExecutionProvider : public OrtEp, public ApiPtrs { // Call cudaStreamSynchronize() after TRT enqueueV3() mutable bool sync_stream_after_enqueue_ = true; - // TODO: Add support for CUDA graph for plugin ep. - /* - CUDAGraph cuda_graph_; - bool is_graph_captured_ = false; - int regular_run_count_before_graph_capture_ = 0; - // There is chance (currently only happens in CUDA EP) that the second regular run allocates GPU memory for causes like: - // (1) memory pattern is enabled. (2) arena allocation for stream. - // Since no GPU memory allocation is allowed during graph capturing, we need at least two regular runs - // to allocate enough memory in Arena before graph capturing. - const int min_num_runs_before_cuda_graph_capture_ = 1; // required min regular runs before graph capture for the necessary memory allocations. - */ - - bool IsGraphCaptureAllowed() const { return false; }; - nvinfer1::IBuilder* GetBuilder(TensorrtLogger& trt_logger) const; /**Check whether all the nodes of the graph are assigned to specific ep*/ From 8451e674b42ae78f9d783e9cdb6f0aa62f513c0e Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Tue, 16 Jun 2026 10:26:40 -0700 Subject: [PATCH 02/10] Add cuda graph support --- CMakeLists.txt | 40 ++++++++++++++++++++++++++++++ src/tensorrt_execution_provider.cc | 24 +++++++++--------- 2 files changed, 52 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3364875..2980706 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,6 +211,46 @@ configure_file( @ONLY ) +# ── Tests ────────────────────────────────────────────────────────────────────── +option(ORTTensorRTEp_BUILD_TESTS "Build unit tests" OFF) + +if(ORTTensorRTEp_BUILD_TESTS) + enable_testing() + + FetchContent_Declare( + googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG v1.14.0 + ) + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) + FetchContent_MakeAvailable(googletest) + + add_executable(trt_ep_tests + tests/cuda_graph_test.cc + ) + target_compile_definitions(trt_ep_tests PRIVATE + -DONNX_NAMESPACE=onnx + -DONNX_ML + -DNOMINMAX + ) + target_include_directories(trt_ep_tests PRIVATE + "$" + "$" + "$" + ) + target_link_libraries(trt_ep_tests PRIVATE + ${ORT_LIBS} + CUDA::cudart + onnx + protobuf::libprotobuf + GTest::gtest_main + ) + + include(GoogleTest) + gtest_discover_tests(trt_ep_tests) +endif() + if(ORTTensorRTEp_INSTALL) # Installation target include(GNUInstallDirs) diff --git a/src/tensorrt_execution_provider.cc b/src/tensorrt_execution_provider.cc index c1eaf22..3ea0b33 100644 --- a/src/tensorrt_execution_provider.cc +++ b/src/tensorrt_execution_provider.cc @@ -3838,6 +3838,18 @@ OrtStatus* TRTEpNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_ptr, void* } } + // Unregister DLA tensor addresses so cuDLA releases its cudlaMemRegister + // hold on ORT's pooled buffers before the allocator recycles the VA. + // setTensorAddress(nullptr) must precede any cudaFree on these pointers. + if (trt_state->dla_enable) { + for (size_t i = 0, end = output_binding_names.size(); i < end; ++i) { + trt_context->setTensorAddress(output_binding_names[i], nullptr); + } + for (size_t i = 0, end = input_binding_names.size(); i < end; ++i) { + trt_context->setTensorAddress(input_binding_names[i], nullptr); + } + } + // End CUDA graph capture. // Note: One reason we don't put end of graph capture in OnRunEnd() like CUDA EP does is because of cuda stream // mentioned in graph capture above, another reason is because OnRunEnd() is not synchronized with OnRunStart() and @@ -3864,18 +3876,6 @@ OrtStatus* TRTEpNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_ptr, void* } } - // Unregister DLA tensor addresses so cuDLA releases its cudlaMemRegister - // hold on ORT's pooled buffers before the allocator recycles the VA. - // setTensorAddress(nullptr) must precede any cudaFree on these pointers. - if (trt_state->dla_enable) { - for (size_t i = 0, end = output_binding_names.size(); i < end; ++i) { - trt_context->setTensorAddress(output_binding_names[i], nullptr); - } - for (size_t i = 0, end = input_binding_names.size(); i < end; ++i) { - trt_context->setTensorAddress(input_binding_names[i], nullptr); - } - } - return nullptr; } From 454243e85ef22dab567230aacf0f29363c5ee7f0 Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Tue, 16 Jun 2026 10:27:07 -0700 Subject: [PATCH 03/10] Add cuda graph test --- tests/cuda_graph_test.cc | 338 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 338 insertions(+) create mode 100644 tests/cuda_graph_test.cc diff --git a/tests/cuda_graph_test.cc b/tests/cuda_graph_test.cc new file mode 100644 index 0000000..d6ec86c --- /dev/null +++ b/tests/cuda_graph_test.cc @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// Unit test for CUDA Graph support in the TensorRT plugin EP. +// Aligned with the basic_cuda_graph test from onnxruntime's test_inference.cc. + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#define ORT_API_MANUAL_INIT +#include "onnxruntime_cxx_api.h" +#undef ORT_API_MANUAL_INIT + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +// Build a simple Mul model: Y = X * X (element-wise) +// Input: X float [3, 2] +// Output: Y float [3, 2] +static std::string CreateMulModel() { + ONNX_NAMESPACE::ModelProto model; + model.set_ir_version(ONNX_NAMESPACE::Version::IR_VERSION); + auto* opset = model.add_opset_import(); + opset->set_domain(""); + opset->set_version(13); + + auto* graph = model.mutable_graph(); + graph->set_name("mul_graph"); + + // Input X + auto* input = graph->add_input(); + input->set_name("X"); + auto* input_type = input->mutable_type()->mutable_tensor_type(); + input_type->set_elem_type(ONNX_NAMESPACE::TensorProto_DataType_FLOAT); + auto* input_shape = input_type->mutable_shape(); + input_shape->add_dim()->set_dim_value(3); + input_shape->add_dim()->set_dim_value(2); + + // Output Y + auto* output = graph->add_output(); + output->set_name("Y"); + auto* output_type = output->mutable_type()->mutable_tensor_type(); + output_type->set_elem_type(ONNX_NAMESPACE::TensorProto_DataType_FLOAT); + auto* output_shape = output_type->mutable_shape(); + output_shape->add_dim()->set_dim_value(3); + output_shape->add_dim()->set_dim_value(2); + + // Node: Y = Mul(X, X) + auto* node = graph->add_node(); + node->set_op_type("Mul"); + node->set_name("mul_0"); + node->add_input("X"); + node->add_input("X"); + node->add_output("Y"); + + // Serialize to string + std::string model_data; + model.SerializeToString(&model_data); + return model_data; +} + +// Write model data to a temporary file and return the path. +static std::filesystem::path WriteModelToTempFile(const std::string& model_data) { + auto temp_dir = std::filesystem::temp_directory_path(); + auto model_path = temp_dir / "trt_cuda_graph_test_mul.onnx"; + std::ofstream ofs(model_path, std::ios::binary); + ofs.write(model_data.data(), model_data.size()); + ofs.close(); + return model_path; +} + +// Get the path to the TRT plugin EP library from environment variable. +static std::string GetEpLibraryPath() { + const char* env = std::getenv("TRT_EP_LIBRARY_PATH"); + if (env && std::strlen(env) > 0) { + return std::string(env); + } + // Fallback: try to find it relative to the test binary + GTEST_LOG_(WARNING) << "TRT_EP_LIBRARY_PATH not set. Set it to the path of ORTTensorRTEp shared library."; + return ""; +} + +// --------------------------------------------------------------------------- +// Test fixture +// --------------------------------------------------------------------------- + +class CudaGraphTest : public ::testing::Test { + protected: + void SetUp() override { + ep_library_path_ = GetEpLibraryPath(); + if (ep_library_path_.empty()) { + GTEST_SKIP() << "TRT_EP_LIBRARY_PATH not set, skipping CUDA graph tests."; + } + + // Initialize ORT API (must be done before creating Env with ORT_API_MANUAL_INIT) + Ort::InitApi(); + + // Create the ORT environment + env_ = std::make_unique(ORT_LOGGING_LEVEL_WARNING, "CudaGraphTest"); + + // Build and write model + auto model_data = CreateMulModel(); + model_path_ = WriteModelToTempFile(model_data); + + // Register the TRT plugin EP library + ep_registration_name_ = "NvTensorRtRtx"; +#ifdef _WIN32 + std::wstring wide_path(ep_library_path_.begin(), ep_library_path_.end()); + env_->RegisterExecutionProviderLibrary(ep_registration_name_.c_str(), wide_path); +#else + env_->RegisterExecutionProviderLibrary(ep_registration_name_.c_str(), ep_library_path_); +#endif + } + + void TearDown() override { + if (!ep_library_path_.empty() && env_) { + env_->UnregisterExecutionProviderLibrary(ep_registration_name_.c_str()); + } + env_.reset(); + // Clean up temp model file + if (!model_path_.empty() && std::filesystem::exists(model_path_)) { + std::filesystem::remove(model_path_); + } + } + + // Create a session with the TRT plugin EP, optionally enabling CUDA graph. + Ort::Session CreateSession(bool enable_cuda_graph) { + Ort::SessionOptions session_options; + + // Get available EP devices and find the TRT one + auto all_ep_devices = env_->GetEpDevices(); + std::vector selected_devices; + for (const auto& ep_device : all_ep_devices) { + if (std::string(ep_device.EpName()) == ep_registration_name_) { + selected_devices.push_back(ep_device); + break; + } + } + EXPECT_FALSE(selected_devices.empty()) << "No TRT EP device found"; + + // EP options + std::unordered_map ep_options; + if (enable_cuda_graph) { + ep_options["trt_cuda_graph_enable"] = "1"; + } + + session_options.AppendExecutionProvider_V2(*env_, selected_devices, ep_options); + +#ifdef _WIN32 + std::wstring wide_model_path = model_path_.wstring(); + return Ort::Session(*env_, wide_model_path.c_str(), session_options); +#else + return Ort::Session(*env_, model_path_.c_str(), session_options); +#endif + } + + std::unique_ptr env_; + std::string ep_library_path_; + std::string ep_registration_name_; + std::filesystem::path model_path_; +}; + +// --------------------------------------------------------------------------- +// Tests +// --------------------------------------------------------------------------- + +// Test basic CUDA graph capture and replay. +// Pattern: Run 1 captures the graph, Run 2 replays it, Run 3 updates input +// in-place and replays again. +// Aligned with CApiTest.basic_cuda_graph from onnxruntime test_inference.cc. +TEST_F(CudaGraphTest, BasicCudaGraph) { + auto session = CreateSession(/*enable_cuda_graph=*/true); + + // Allocate input/output on CUDA device + Ort::MemoryInfo mem_info("Cuda", OrtAllocatorType::OrtDeviceAllocator, 0, OrtMemTypeDefault); + Ort::Allocator allocator(session, mem_info); + + constexpr int64_t num_elements = 3 * 2; + const std::array shape = {3, 2}; + + // Pre-allocate device buffers + auto input_alloc = allocator.GetAllocation(num_elements * sizeof(float)); + auto output_alloc = allocator.GetAllocation(num_elements * sizeof(float)); + + // Initial input values + std::array x_values = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + // Expected: Y = X * X + std::array expected_y = {1.0f, 4.0f, 9.0f, 16.0f, 25.0f, 36.0f}; + + // Copy input to device + cudaMemcpy(input_alloc.get(), x_values.data(), + num_elements * sizeof(float), cudaMemcpyHostToDevice); + + // Create bound tensors from pre-allocated device memory + auto bound_x = Ort::Value::CreateTensor( + mem_info, static_cast(input_alloc.get()), + num_elements, shape.data(), shape.size()); + auto bound_y = Ort::Value::CreateTensor( + mem_info, static_cast(output_alloc.get()), + num_elements, shape.data(), shape.size()); + + // Bind inputs/outputs + Ort::IoBinding binding(session); + binding.BindInput("X", bound_x); + binding.BindOutput("Y", bound_y); + + // --- Run 1: This run triggers CUDA graph capture --- + session.Run(Ort::RunOptions{}, binding); + + std::array y_values; + cudaMemcpy(y_values.data(), output_alloc.get(), + num_elements * sizeof(float), cudaMemcpyDeviceToHost); + + for (size_t i = 0; i < num_elements; i++) { + EXPECT_NEAR(y_values[i], expected_y[i], 1e-5f) + << "Run 1 mismatch at index " << i; + } + + // --- Run 2: This run replays the captured CUDA graph --- + session.Run(Ort::RunOptions{}, binding); + + cudaMemcpy(y_values.data(), output_alloc.get(), + num_elements * sizeof(float), cudaMemcpyDeviceToHost); + + for (size_t i = 0; i < num_elements; i++) { + EXPECT_NEAR(y_values[i], expected_y[i], 1e-5f) + << "Run 2 (replay) mismatch at index " << i; + } + + // --- Run 3: Update input in-place and replay the graph --- + // CUDA graph replays use the same device pointers, so updating the input + // buffer in-place will produce different outputs on the next replay. + x_values = {10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 60.0f}; + expected_y = {100.0f, 400.0f, 900.0f, 1600.0f, 2500.0f, 3600.0f}; + + cudaMemcpy(input_alloc.get(), x_values.data(), + num_elements * sizeof(float), cudaMemcpyHostToDevice); + + binding.SynchronizeInputs(); + session.Run(Ort::RunOptions{}, binding); + + cudaMemcpy(y_values.data(), output_alloc.get(), + num_elements * sizeof(float), cudaMemcpyDeviceToHost); + + for (size_t i = 0; i < num_elements; i++) { + EXPECT_NEAR(y_values[i], expected_y[i], 1e-5f) + << "Run 3 (updated input replay) mismatch at index " << i; + } + + binding.ClearBoundInputs(); + binding.ClearBoundOutputs(); +} + +// Test that inference works correctly without CUDA graph (baseline). +TEST_F(CudaGraphTest, WithoutCudaGraph) { + auto session = CreateSession(/*enable_cuda_graph=*/false); + + std::array x_values = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + std::array expected_y = {1.0f, 4.0f, 9.0f, 16.0f, 25.0f, 36.0f}; + const std::array shape = {3, 2}; + + Ort::MemoryInfo cpu_mem = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + auto input_tensor = Ort::Value::CreateTensor( + cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + + const char* input_names[] = {"X"}; + const char* output_names[] = {"Y"}; + auto outputs = session.Run(Ort::RunOptions{}, input_names, &input_tensor, 1, output_names, 1); + + ASSERT_EQ(outputs.size(), 1u); + auto& output_tensor = outputs[0]; + const float* output_data = output_tensor.GetTensorData(); + + for (size_t i = 0; i < expected_y.size(); i++) { + EXPECT_NEAR(output_data[i], expected_y[i], 1e-5f) + << "Baseline mismatch at index " << i; + } +} + +// Test multiple sequential runs with CUDA graph to verify stability. +TEST_F(CudaGraphTest, MultipleReplays) { + auto session = CreateSession(/*enable_cuda_graph=*/true); + + Ort::MemoryInfo mem_info("Cuda", OrtAllocatorType::OrtDeviceAllocator, 0, OrtMemTypeDefault); + Ort::Allocator allocator(session, mem_info); + + constexpr int64_t num_elements = 3 * 2; + const std::array shape = {3, 2}; + + auto input_alloc = allocator.GetAllocation(num_elements * sizeof(float)); + auto output_alloc = allocator.GetAllocation(num_elements * sizeof(float)); + + std::array x_values = {2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f}; + std::array expected_y = {4.0f, 9.0f, 16.0f, 25.0f, 36.0f, 49.0f}; + + cudaMemcpy(input_alloc.get(), x_values.data(), + num_elements * sizeof(float), cudaMemcpyHostToDevice); + + auto bound_x = Ort::Value::CreateTensor( + mem_info, static_cast(input_alloc.get()), + num_elements, shape.data(), shape.size()); + auto bound_y = Ort::Value::CreateTensor( + mem_info, static_cast(output_alloc.get()), + num_elements, shape.data(), shape.size()); + + Ort::IoBinding binding(session); + binding.BindInput("X", bound_x); + binding.BindOutput("Y", bound_y); + + // Run multiple times — first run captures, rest replay + constexpr int num_runs = 10; + for (int run = 0; run < num_runs; run++) { + session.Run(Ort::RunOptions{}, binding); + + std::array y_values; + cudaMemcpy(y_values.data(), output_alloc.get(), + num_elements * sizeof(float), cudaMemcpyDeviceToHost); + + for (size_t i = 0; i < num_elements; i++) { + EXPECT_NEAR(y_values[i], expected_y[i], 1e-5f) + << "Run " << (run + 1) << " mismatch at index " << i; + } + } + + binding.ClearBoundInputs(); + binding.ClearBoundOutputs(); +} From 4c53d6a72b1c16a9fc17943a604c4ec20747ea1f Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Tue, 16 Jun 2026 10:32:55 -0700 Subject: [PATCH 04/10] update registration name in test --- tests/cuda_graph_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cuda_graph_test.cc b/tests/cuda_graph_test.cc index d6ec86c..1b65f01 100644 --- a/tests/cuda_graph_test.cc +++ b/tests/cuda_graph_test.cc @@ -114,7 +114,7 @@ class CudaGraphTest : public ::testing::Test { model_path_ = WriteModelToTempFile(model_data); // Register the TRT plugin EP library - ep_registration_name_ = "NvTensorRtRtx"; + ep_registration_name_ = "TRTPluginEP"; #ifdef _WIN32 std::wstring wide_path(ep_library_path_.begin(), ep_library_path_.end()); env_->RegisterExecutionProviderLibrary(ep_registration_name_.c_str(), wide_path); From 5a3a308c9f403c63f969a3fb40793d9c2254db7a Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Tue, 16 Jun 2026 11:34:57 -0700 Subject: [PATCH 05/10] Add TensorRT basic unit tests adapted from onnxruntime Port tests from onnxruntime/test/providers/tensorrt/tensorrt_basic_test.cc to work with the plugin EP library registration approach. Tests include: - FunctionTest: basic Add+Add model inference - RemoveCycleTest: boolean logic ops graph partitioning - TestSessionOutputs: model output count verification - DDSOutputTest: data-dependent shape output - MnistModelTest: real model load and inference - EngineCacheTest: engine caching verification - MultiThreadInference: concurrent inference stability - SequentialRuns: repeated inference stability - DynamicInputShapes: varying input dimensions - EPContext source attribution tests (foreign/no source) Also adds testdata models from onnxruntime repo and CMake post-build copy rule to make testdata available to tests. Custom op tests excluded (will be in separate branch). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 15 +- tests/tensorrt_basic_test.cc | 781 ++++++++++++++++++ tests/testdata/TRTEP_test_model/mnist.onnx | Bin 0 -> 26454 bytes tests/testdata/mnist.onnx | Bin 0 -> 26454 bytes tests/testdata/node_output_not_used.onnx | Bin 0 -> 189 bytes .../testdata/ort_github_issue_26272_dds.onnx | 28 + .../topk_and_multiple_graph_outputs.onnx | Bin 0 -> 393 bytes 7 files changed, 823 insertions(+), 1 deletion(-) create mode 100644 tests/tensorrt_basic_test.cc create mode 100644 tests/testdata/TRTEP_test_model/mnist.onnx create mode 100644 tests/testdata/mnist.onnx create mode 100644 tests/testdata/node_output_not_used.onnx create mode 100644 tests/testdata/ort_github_issue_26272_dds.onnx create mode 100644 tests/testdata/topk_and_multiple_graph_outputs.onnx diff --git a/CMakeLists.txt b/CMakeLists.txt index 2980706..e691942 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,6 +228,7 @@ if(ORTTensorRTEp_BUILD_TESTS) add_executable(trt_ep_tests tests/cuda_graph_test.cc + tests/tensorrt_basic_test.cc ) target_compile_definitions(trt_ep_tests PRIVATE -DONNX_NAMESPACE=onnx @@ -247,8 +248,20 @@ if(ORTTensorRTEp_BUILD_TESTS) GTest::gtest_main ) + # Copy testdata to the build directory so tests can find it + if(EXISTS "${CMAKE_SOURCE_DIR}/tests/testdata") + add_custom_command(TARGET trt_ep_tests POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + "${CMAKE_SOURCE_DIR}/tests/testdata" + "$/testdata" + COMMENT "Copying testdata to build output directory" + ) + endif() + include(GoogleTest) - gtest_discover_tests(trt_ep_tests) + gtest_discover_tests(trt_ep_tests + PROPERTIES ENVIRONMENT "TESTDATA_DIR=$/testdata" + ) endif() if(ORTTensorRTEp_INSTALL) diff --git a/tests/tensorrt_basic_test.cc b/tests/tensorrt_basic_test.cc new file mode 100644 index 0000000..7c3a861 --- /dev/null +++ b/tests/tensorrt_basic_test.cc @@ -0,0 +1,781 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// Unit tests for TensorRT plugin EP basic functionality. +// Adapted from onnxruntime/test/providers/tensorrt/tensorrt_basic_test.cc +// to work with the plugin EP library registration approach. + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#define ORT_API_MANUAL_INIT +#include "onnxruntime_cxx_api.h" +#undef ORT_API_MANUAL_INIT + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +// Get the directory where testdata files are stored. +// Looks for TESTDATA_DIR env var, otherwise uses a relative path from the binary. +static std::filesystem::path GetTestDataDir() { + const char* env = std::getenv("TESTDATA_DIR"); + if (env && std::strlen(env) > 0) { + return std::filesystem::path(env); + } + // Try relative to current working directory + auto cwd_path = std::filesystem::current_path() / "testdata"; + if (std::filesystem::exists(cwd_path)) { + return cwd_path; + } + // Try source tree layout + auto src_path = std::filesystem::current_path() / "tests" / "testdata"; + if (std::filesystem::exists(src_path)) { + return src_path; + } + return std::filesystem::path("testdata"); +} + +// Get the path to the TRT plugin EP library from environment variable. +static std::string GetEpLibraryPath() { + const char* env = std::getenv("TRT_EP_LIBRARY_PATH"); + if (env && std::strlen(env) > 0) { + return std::string(env); + } + GTEST_LOG_(WARNING) << "TRT_EP_LIBRARY_PATH not set. Set it to the path of ORTTensorRTEp shared library."; + return ""; +} + +// Build a model with Add ops: M = (X + Y) + Z +// Input: X, Y, Z float [dims...] +// Output: M float [dims...] +static std::string CreateAddModel(const std::vector& dims) { + ONNX_NAMESPACE::ModelProto model; + model.set_ir_version(ONNX_NAMESPACE::Version::IR_VERSION); + auto* opset = model.add_opset_import(); + opset->set_domain(""); + opset->set_version(13); + + auto* graph = model.mutable_graph(); + graph->set_name("add_graph"); + + auto make_float_type = [&](const std::vector& shape) { + ONNX_NAMESPACE::TypeProto type; + type.mutable_tensor_type()->set_elem_type(ONNX_NAMESPACE::TensorProto_DataType_FLOAT); + for (auto d : shape) { + if (d < 0) { + type.mutable_tensor_type()->mutable_shape()->add_dim()->set_dim_param("dynamic"); + } else { + type.mutable_tensor_type()->mutable_shape()->add_dim()->set_dim_value(d); + } + } + return type; + }; + + auto float_type = make_float_type(dims); + + // Inputs + for (const char* name : {"X", "Y", "Z"}) { + auto* input = graph->add_input(); + input->set_name(name); + *input->mutable_type() = float_type; + } + + // Output M + auto* output = graph->add_output(); + output->set_name("M"); + *output->mutable_type() = float_type; + + // Node 1: tmp = Add(X, Y) + auto* node1 = graph->add_node(); + node1->set_op_type("Add"); + node1->set_name("node_1"); + node1->add_input("X"); + node1->add_input("Y"); + node1->add_output("node_1_out"); + + // Node 2: M = Add(tmp, Z) + auto* node2 = graph->add_node(); + node2->set_op_type("Add"); + node2->set_name("node_2"); + node2->add_input("node_1_out"); + node2->add_input("Z"); + node2->add_output("M"); + + std::string model_data; + model.SerializeToString(&model_data); + return model_data; +} + +// Build a model with Bool/logic ops: M = And(Not(Xor(X, Y)), Xor(Not(Xor(X, Y)), Z)) +// Tests graph partitioning with ops that may not all be TRT-supported. +// Input: X, Y, Z bool [dims...] +// Output: M bool [dims...] +static std::string CreateBoolLogicModel(const std::vector& dims) { + ONNX_NAMESPACE::ModelProto model; + model.set_ir_version(ONNX_NAMESPACE::Version::IR_VERSION); + auto* opset = model.add_opset_import(); + opset->set_domain(""); + opset->set_version(13); + + auto* graph = model.mutable_graph(); + graph->set_name("bool_logic_graph"); + + auto make_bool_type = [&](const std::vector& shape) { + ONNX_NAMESPACE::TypeProto type; + type.mutable_tensor_type()->set_elem_type(ONNX_NAMESPACE::TensorProto_DataType_BOOL); + for (auto d : shape) { + type.mutable_tensor_type()->mutable_shape()->add_dim()->set_dim_value(d); + } + return type; + }; + + auto bool_type = make_bool_type(dims); + + // Inputs + for (const char* name : {"X", "Y", "Z"}) { + auto* input = graph->add_input(); + input->set_name(name); + *input->mutable_type() = bool_type; + } + + // Output M + auto* output = graph->add_output(); + output->set_name("M"); + *output->mutable_type() = bool_type; + + // Node 1: xor1_out = Xor(X, Y) + auto* node1 = graph->add_node(); + node1->set_op_type("Xor"); + node1->set_name("xor1"); + node1->add_input("X"); + node1->add_input("Y"); + node1->add_output("xor1_out"); + + // Node 2: not_out = Not(xor1_out) + auto* node2 = graph->add_node(); + node2->set_op_type("Not"); + node2->set_name("not"); + node2->add_input("xor1_out"); + node2->add_output("not_out"); + + // Node 3: xor2_out = Xor(not_out, Z) + auto* node3 = graph->add_node(); + node3->set_op_type("Xor"); + node3->set_name("xor2"); + node3->add_input("not_out"); + node3->add_input("Z"); + node3->add_output("xor2_out"); + + // Node 4: M = And(not_out, xor2_out) + auto* node4 = graph->add_node(); + node4->set_op_type("And"); + node4->set_name("and"); + node4->add_input("not_out"); + node4->add_input("xor2_out"); + node4->add_output("M"); + + std::string model_data; + model.SerializeToString(&model_data); + return model_data; +} + +// Create a synthetic EPContext model with a specific "source" attribute. +static std::string CreateSyntheticEPContextModel(const std::string& source_attr, + bool include_source_attr = true) { + ONNX_NAMESPACE::ModelProto model; + model.set_ir_version(ONNX_NAMESPACE::Version::IR_VERSION); + auto* opset = model.add_opset_import(); + opset->set_domain(""); + opset->set_version(11); + auto* ms_opset = model.add_opset_import(); + ms_opset->set_domain("com.microsoft"); + ms_opset->set_version(1); + + auto* graph = model.mutable_graph(); + graph->set_name("EPContextSourceTest"); + + // Input + auto* input = graph->add_input(); + input->set_name("input"); + auto* input_type = input->mutable_type()->mutable_tensor_type(); + input_type->set_elem_type(ONNX_NAMESPACE::TensorProto_DataType_FLOAT); + input_type->mutable_shape()->add_dim()->set_dim_value(1); + input_type->mutable_shape()->add_dim()->set_dim_value(3); + + // Output + auto* output = graph->add_output(); + output->set_name("output"); + auto* output_type = output->mutable_type()->mutable_tensor_type(); + output_type->set_elem_type(ONNX_NAMESPACE::TensorProto_DataType_FLOAT); + output_type->mutable_shape()->add_dim()->set_dim_value(1); + output_type->mutable_shape()->add_dim()->set_dim_value(3); + + // EPContext node + auto* node = graph->add_node(); + node->set_op_type("EPContext"); + node->set_domain("com.microsoft"); + node->set_name("ep_context_node"); + node->add_input("input"); + node->add_output("output"); + + // embed_mode attribute + auto* attr_embed = node->add_attribute(); + attr_embed->set_name("embed_mode"); + attr_embed->set_type(ONNX_NAMESPACE::AttributeProto_AttributeType_INT); + attr_embed->set_i(1); + + // ep_cache_context attribute (dummy data) + auto* attr_cache = node->add_attribute(); + attr_cache->set_name("ep_cache_context"); + attr_cache->set_type(ONNX_NAMESPACE::AttributeProto_AttributeType_STRING); + attr_cache->set_s("dummy_context_data"); + + // source attribute (conditionally added) + if (include_source_attr) { + auto* attr_source = node->add_attribute(); + attr_source->set_name("source"); + attr_source->set_type(ONNX_NAMESPACE::AttributeProto_AttributeType_STRING); + attr_source->set_s(source_attr); + } + + std::string model_data; + model.SerializeToString(&model_data); + return model_data; +} + +// Write model data to a file and return the path. +static std::filesystem::path WriteModelToFile(const std::string& model_data, + const std::string& filename) { + auto temp_dir = std::filesystem::temp_directory_path(); + auto model_path = temp_dir / filename; + std::ofstream ofs(model_path, std::ios::binary); + ofs.write(model_data.data(), model_data.size()); + ofs.close(); + return model_path; +} + +// --------------------------------------------------------------------------- +// Test fixture +// --------------------------------------------------------------------------- + +class TensorrtBasicTest : public ::testing::Test { + protected: + void SetUp() override { + ep_library_path_ = GetEpLibraryPath(); + if (ep_library_path_.empty()) { + GTEST_SKIP() << "TRT_EP_LIBRARY_PATH not set, skipping TensorRT basic tests."; + } + + Ort::InitApi(); + env_ = std::make_unique(ORT_LOGGING_LEVEL_WARNING, "TensorrtBasicTest"); + + ep_registration_name_ = "TRTPluginEP"; +#ifdef _WIN32 + std::wstring wide_path(ep_library_path_.begin(), ep_library_path_.end()); + env_->RegisterExecutionProviderLibrary(ep_registration_name_.c_str(), wide_path); +#else + env_->RegisterExecutionProviderLibrary(ep_registration_name_.c_str(), ep_library_path_); +#endif + } + + void TearDown() override { + if (!ep_library_path_.empty() && env_) { + env_->UnregisterExecutionProviderLibrary(ep_registration_name_.c_str()); + } + env_.reset(); + // Clean up temp model files + for (const auto& path : temp_files_) { + if (std::filesystem::exists(path)) { + std::filesystem::remove(path); + } + } + } + + // Create a session with the TRT plugin EP. + Ort::Session CreateSession(const std::filesystem::path& model_path, + const std::unordered_map& ep_options = {}) { + Ort::SessionOptions session_options; + + auto all_ep_devices = env_->GetEpDevices(); + std::vector selected_devices; + for (const auto& ep_device : all_ep_devices) { + if (std::string(ep_device.EpName()) == ep_registration_name_) { + selected_devices.push_back(ep_device); + break; + } + } + EXPECT_FALSE(selected_devices.empty()) << "No TRT EP device found"; + + session_options.AppendExecutionProvider_V2(*env_, selected_devices, ep_options); + +#ifdef _WIN32 + std::wstring wide_model_path = model_path.wstring(); + return Ort::Session(*env_, wide_model_path.c_str(), session_options); +#else + return Ort::Session(*env_, model_path.c_str(), session_options); +#endif + } + + // Write model to temp and track for cleanup + std::filesystem::path WriteAndTrack(const std::string& model_data, const std::string& filename) { + auto path = WriteModelToFile(model_data, filename); + temp_files_.push_back(path); + return path; + } + + std::unique_ptr env_; + std::string ep_library_path_; + std::string ep_registration_name_; + std::vector temp_files_; +}; + +// --------------------------------------------------------------------------- +// Tests +// --------------------------------------------------------------------------- + +// Test basic inference with a simple Add model: M = (X + Y) + Z +// Adapted from TensorrtExecutionProviderTest.FunctionTest +TEST_F(TensorrtBasicTest, FunctionTest) { + std::vector dims = {1, 3, 2}; + auto model_data = CreateAddModel(dims); + auto model_path = WriteAndTrack(model_data, "trt_basic_function_test.onnx"); + + auto session = CreateSession(model_path); + + // Prepare inputs + std::array x_values = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + const std::array shape = {1, 3, 2}; + + Ort::MemoryInfo cpu_mem = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + auto input_x = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_y = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_z = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + + const char* input_names[] = {"X", "Y", "Z"}; + const char* output_names[] = {"M"}; + Ort::Value inputs[] = {std::move(input_x), std::move(input_y), std::move(input_z)}; + + auto outputs = session.Run(Ort::RunOptions{}, input_names, inputs, 3, output_names, 1); + + ASSERT_EQ(outputs.size(), 1u); + const float* output_data = outputs[0].GetTensorData(); + + // Expected: M = (X + Y) + Z = X*3 for all same inputs + std::array expected = {3.0f, 6.0f, 9.0f, 12.0f, 15.0f, 18.0f}; + for (size_t i = 0; i < expected.size(); i++) { + EXPECT_NEAR(output_data[i], expected[i], 1e-5f) << "Mismatch at index " << i; + } +} + +// Test inference with boolean logic ops: graph partitioning test. +// Adapted from TensorrtExecutionProviderTest.RemoveCycleTest +TEST_F(TensorrtBasicTest, RemoveCycleTest) { + std::vector dims = {1, 3, 2}; + auto model_data = CreateBoolLogicModel(dims); + auto model_path = WriteAndTrack(model_data, "trt_basic_removecycle_test.onnx"); + + auto session = CreateSession(model_path); + + // Prepare bool inputs + // ONNX bool tensors use 1 byte per element + std::array x_values = {true, false, true, false, true, false}; + std::array y_values = {true, true, false, true, false, false}; + std::array z_values = {true, false, true, false, true, false}; + const std::array shape = {1, 3, 2}; + + Ort::MemoryInfo cpu_mem = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + auto input_x = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_y = Ort::Value::CreateTensor(cpu_mem, y_values.data(), y_values.size(), shape.data(), shape.size()); + auto input_z = Ort::Value::CreateTensor(cpu_mem, z_values.data(), z_values.size(), shape.data(), shape.size()); + + const char* input_names[] = {"X", "Y", "Z"}; + const char* output_names[] = {"M"}; + Ort::Value inputs[] = {std::move(input_x), std::move(input_y), std::move(input_z)}; + + auto outputs = session.Run(Ort::RunOptions{}, input_names, inputs, 3, output_names, 1); + + ASSERT_EQ(outputs.size(), 1u); + const bool* output_data = outputs[0].GetTensorData(); + + // Expected results: + // xor1 = X ^ Y = {0, 1, 1, 1, 1, 0} + // not = !xor1 = {1, 0, 0, 0, 0, 1} + // xor2 = not ^ Z = {0, 0, 1, 0, 1, 1} + // M = not & xor2 = {0, 0, 0, 0, 0, 1} + std::array expected = {false, false, false, false, false, true}; + for (size_t i = 0; i < expected.size(); i++) { + EXPECT_EQ(output_data[i], expected[i]) << "Mismatch at index " << i; + } +} + +// Test that session reports correct number of outputs for models with multiple outputs. +// Adapted from TensorrtExecutionProviderTest.TestSessionOutputs +TEST_F(TensorrtBasicTest, TestSessionOutputs_MultipleOutputs) { + auto testdata_dir = GetTestDataDir(); + auto model_path = testdata_dir / "topk_and_multiple_graph_outputs.onnx"; + if (!std::filesystem::exists(model_path)) { + GTEST_SKIP() << "Test model not found: " << model_path; + } + + auto session = CreateSession(model_path); + size_t output_count = session.GetOutputCount(); + ASSERT_EQ(output_count, 4u); +} + +// Test that session reports correct number of outputs for model with unused node outputs. +// Adapted from TensorrtExecutionProviderTest.TestSessionOutputs (model #2) +TEST_F(TensorrtBasicTest, TestSessionOutputs_UnusedNodeOutput) { + auto testdata_dir = GetTestDataDir(); + auto model_path = testdata_dir / "node_output_not_used.onnx"; + if (!std::filesystem::exists(model_path)) { + GTEST_SKIP() << "Test model not found: " << model_path; + } + + auto session = CreateSession(model_path); + size_t output_count = session.GetOutputCount(); + ASSERT_EQ(output_count, 1u); +} + +// Test inference with a model that has data-dependent shape (DDS) output. +// Adapted from TensorrtExecutionProviderTest.DDSOutputTest +TEST_F(TensorrtBasicTest, DDSOutputTest) { + auto testdata_dir = GetTestDataDir(); + auto model_path = testdata_dir / "ort_github_issue_26272_dds.onnx"; + if (!std::filesystem::exists(model_path)) { + GTEST_SKIP() << "Test model not found: " << model_path; + } + + auto session = CreateSession(model_path); + + // First run with shape [3, 4] + std::vector input_data(12, 0.0f); // 3*4 + std::array shape1 = {3, 4}; + + Ort::MemoryInfo cpu_mem = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + auto input_tensor = Ort::Value::CreateTensor(cpu_mem, input_data.data(), input_data.size(), + shape1.data(), shape1.size()); + + const char* input_names[] = {"data"}; + const char* output_names[] = {"output"}; + + auto outputs = session.Run(Ort::RunOptions{}, input_names, &input_tensor, 1, output_names, 1); + ASSERT_EQ(outputs.size(), 1u); + + // Second run with different shape [6, 4] + std::vector input_data2(24, 0.0f); // 6*4 + std::array shape2 = {6, 4}; + auto input_tensor2 = Ort::Value::CreateTensor(cpu_mem, input_data2.data(), input_data2.size(), + shape2.data(), shape2.size()); + + auto outputs2 = session.Run(Ort::RunOptions{}, input_names, &input_tensor2, 1, output_names, 1); + ASSERT_EQ(outputs2.size(), 1u); +} + +// Test multi-threaded inference with a single session. +// Adapted from TensorrtExecutionProviderTest.SessionCreationWithSingleThreadAndInferenceWithMultiThreads +TEST_F(TensorrtBasicTest, MultiThreadInference) { + std::vector dims = {1, 3, 2}; + auto model_data = CreateAddModel(dims); + auto model_path = WriteAndTrack(model_data, "trt_basic_multithread_test.onnx"); + + auto session = CreateSession(model_path); + + std::array x_values = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + std::array expected = {3.0f, 6.0f, 9.0f, 12.0f, 15.0f, 18.0f}; + const std::array shape = {1, 3, 2}; + + auto run_inference = [&](int thread_id) { + Ort::MemoryInfo cpu_mem = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + // Each thread needs its own copy of input data + std::array local_x = x_values; + auto input_x = Ort::Value::CreateTensor(cpu_mem, local_x.data(), local_x.size(), shape.data(), shape.size()); + auto input_y = Ort::Value::CreateTensor(cpu_mem, local_x.data(), local_x.size(), shape.data(), shape.size()); + auto input_z = Ort::Value::CreateTensor(cpu_mem, local_x.data(), local_x.size(), shape.data(), shape.size()); + + const char* input_names[] = {"X", "Y", "Z"}; + const char* output_names[] = {"M"}; + Ort::Value inputs[] = {std::move(input_x), std::move(input_y), std::move(input_z)}; + + auto outputs = session.Run(Ort::RunOptions{}, input_names, inputs, 3, output_names, 1); + + ASSERT_EQ(outputs.size(), 1u) << "Thread " << thread_id; + const float* output_data = outputs[0].GetTensorData(); + for (size_t i = 0; i < expected.size(); i++) { + EXPECT_NEAR(output_data[i], expected[i], 1e-5f) + << "Thread " << thread_id << " mismatch at index " << i; + } + }; + + constexpr int num_threads = 5; + std::vector threads; + for (int i = 0; i < num_threads; ++i) { + threads.emplace_back(run_inference, i); + } + for (auto& th : threads) { + th.join(); + } +} + +// Test that the mnist model can be loaded and run. +// Adapted from TensorrtExecutionProviderTest.TRTModelIdGeneratorUsingModelHashing (inference portion) +TEST_F(TensorrtBasicTest, MnistModelTest) { + auto testdata_dir = GetTestDataDir(); + auto model_path = testdata_dir / "mnist.onnx"; + if (!std::filesystem::exists(model_path)) { + GTEST_SKIP() << "Test model not found: " << model_path; + } + + auto session = CreateSession(model_path); + + // mnist model: input "Input3" shape [1, 1, 28, 28], output "Plus214_Output_0" shape [1, 10] + std::vector input_data(784, 1.0f); // 1*1*28*28 + std::array shape = {1, 1, 28, 28}; + + Ort::MemoryInfo cpu_mem = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + auto input_tensor = Ort::Value::CreateTensor(cpu_mem, input_data.data(), input_data.size(), + shape.data(), shape.size()); + + const char* input_names[] = {"Input3"}; + const char* output_names[] = {"Plus214_Output_0"}; + + auto outputs = session.Run(Ort::RunOptions{}, input_names, &input_tensor, 1, output_names, 1); + ASSERT_EQ(outputs.size(), 1u); + + auto type_info = outputs[0].GetTensorTypeAndShapeInfo(); + auto out_shape = type_info.GetShape(); + ASSERT_EQ(out_shape.size(), 2u); + EXPECT_EQ(out_shape[0], 1); + EXPECT_EQ(out_shape[1], 10); +} + +// Test engine caching: run inference twice and verify that engine cache is produced. +// Adapted from TensorrtExecutionProviderCacheTest (engine cache portion) +TEST_F(TensorrtBasicTest, EngineCacheTest) { + std::vector dims = {1, 3, 2}; + auto model_data = CreateAddModel(dims); + auto model_path = WriteAndTrack(model_data, "trt_basic_cache_test.onnx"); + + // Create a temp dir for caching + auto cache_dir = std::filesystem::temp_directory_path() / "trt_ep_cache_test"; + std::filesystem::create_directories(cache_dir); + + std::unordered_map ep_options; + ep_options["trt_engine_cache_enable"] = "1"; + ep_options["trt_engine_cache_path"] = cache_dir.string(); + + auto session = CreateSession(model_path, ep_options); + + // Run inference + std::array x_values = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + const std::array shape = {1, 3, 2}; + + Ort::MemoryInfo cpu_mem = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + auto input_x = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_y = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_z = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + + const char* input_names[] = {"X", "Y", "Z"}; + const char* output_names[] = {"M"}; + Ort::Value inputs[] = {std::move(input_x), std::move(input_y), std::move(input_z)}; + + auto outputs = session.Run(Ort::RunOptions{}, input_names, inputs, 3, output_names, 1); + ASSERT_EQ(outputs.size(), 1u); + + const float* output_data = outputs[0].GetTensorData(); + std::array expected = {3.0f, 6.0f, 9.0f, 12.0f, 15.0f, 18.0f}; + for (size_t i = 0; i < expected.size(); i++) { + EXPECT_NEAR(output_data[i], expected[i], 1e-5f) << "Mismatch at index " << i; + } + + // Check that cache files were produced + bool has_engine_cache = false; + if (std::filesystem::exists(cache_dir)) { + for (const auto& entry : std::filesystem::directory_iterator(cache_dir)) { + if (entry.is_regular_file()) { + std::string ext = entry.path().extension().string(); + if (ext == ".engine" || ext == ".trt") { + has_engine_cache = true; + break; + } + } + } + } + // Note: cache file creation depends on the EP implementation. + // If no cache file is found, it's not necessarily a failure for the plugin EP. + if (has_engine_cache) { + GTEST_LOG_(INFO) << "Engine cache file found in " << cache_dir; + } + + // Clean up cache dir + std::filesystem::remove_all(cache_dir); +} + +// Test EPContext node: EP should NOT claim an EPContext node whose "source" +// attribute belongs to a different EP (e.g., OpenVINO). +// Adapted from TensorrtExecutionProviderTest.EPContextNode_ForeignSourceSkipped +TEST_F(TensorrtBasicTest, EPContextNode_ForeignSourceSkipped) { + auto model_data = CreateSyntheticEPContextModel("OpenVINOExecutionProvider"); + auto model_path = WriteAndTrack(model_data, "ep_context_foreign_source_plugin.onnx"); + + // Try to create session - it should either fail or fallback to CPU + // (since no EP claims the EPContext node with foreign source) + try { + auto session = CreateSession(model_path); + // If session creation succeeds, the EPContext node was handled somehow. + // This is acceptable if it falls back to CPU EP. + GTEST_LOG_(INFO) << "Session created (possibly fell back to CPU)"; + } catch (const Ort::Exception& e) { + // Expected: session creation fails because no EP claims the node + std::string error_msg = e.what(); + GTEST_LOG_(INFO) << "Session creation failed as expected: " << error_msg; + SUCCEED(); + } +} + +// Test EPContext node: EP should still claim a node with NO "source" attribute +// (backward compatibility). +// Adapted from TensorrtExecutionProviderTest.EPContextNode_NoSourceAttribute_BackwardCompat +TEST_F(TensorrtBasicTest, EPContextNode_NoSourceAttribute_BackwardCompat) { + auto model_data = CreateSyntheticEPContextModel("", /*include_source_attr=*/false); + auto model_path = WriteAndTrack(model_data, "ep_context_no_source_plugin.onnx"); + + // The EP should claim the node (backward compatibility). + // It may fail during engine deserialization since context data is synthetic, + // but the error should NOT be about no EP claiming the node. + try { + auto session = CreateSession(model_path); + GTEST_LOG_(INFO) << "Session created successfully (EP claimed the node)"; + } catch (const Ort::Exception& e) { + std::string error_msg = e.what(); + // The error should NOT indicate that no EP claimed the node + EXPECT_TRUE(error_msg.find("is not compatible with any execution provider") == std::string::npos) + << "Legacy EPContext node without source should still be claimed. Error: " << error_msg; + } +} + +// Test running the same model multiple times in sequence to verify stability. +TEST_F(TensorrtBasicTest, SequentialRuns) { + std::vector dims = {1, 3, 2}; + auto model_data = CreateAddModel(dims); + auto model_path = WriteAndTrack(model_data, "trt_basic_sequential_test.onnx"); + + auto session = CreateSession(model_path); + + std::array x_values = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + std::array expected = {3.0f, 6.0f, 9.0f, 12.0f, 15.0f, 18.0f}; + const std::array shape = {1, 3, 2}; + + Ort::MemoryInfo cpu_mem = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + + for (int run = 0; run < 5; run++) { + auto input_x = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_y = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_z = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + + const char* input_names[] = {"X", "Y", "Z"}; + const char* output_names[] = {"M"}; + Ort::Value inputs[] = {std::move(input_x), std::move(input_y), std::move(input_z)}; + + auto outputs = session.Run(Ort::RunOptions{}, input_names, inputs, 3, output_names, 1); + ASSERT_EQ(outputs.size(), 1u); + + const float* output_data = outputs[0].GetTensorData(); + for (size_t i = 0; i < expected.size(); i++) { + EXPECT_NEAR(output_data[i], expected[i], 1e-5f) + << "Run " << run << " mismatch at index " << i; + } + } +} + +// Test with dynamic input shapes - run with different shapes. +// Adapted from TensorrtExecutionProviderCacheTest engine_dynamic test. +TEST_F(TensorrtBasicTest, DynamicInputShapes) { + // Create model with dynamic dims + std::vector dims = {1, -1, -1}; // dynamic shape + auto model_data = CreateAddModel(dims); + auto model_path = WriteAndTrack(model_data, "trt_basic_dynamic_shape_test.onnx"); + + auto session = CreateSession(model_path); + + Ort::MemoryInfo cpu_mem = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + + // First run with shape [1, 3, 2] + { + std::array x_values = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + std::array expected = {3.0f, 6.0f, 9.0f, 12.0f, 15.0f, 18.0f}; + const std::array shape = {1, 3, 2}; + + auto input_x = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_y = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_z = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + + const char* input_names[] = {"X", "Y", "Z"}; + const char* output_names[] = {"M"}; + Ort::Value inputs[] = {std::move(input_x), std::move(input_y), std::move(input_z)}; + + auto outputs = session.Run(Ort::RunOptions{}, input_names, inputs, 3, output_names, 1); + ASSERT_EQ(outputs.size(), 1u); + + const float* output_data = outputs[0].GetTensorData(); + for (size_t i = 0; i < expected.size(); i++) { + EXPECT_NEAR(output_data[i], expected[i], 1e-5f) << "Run 1 mismatch at index " << i; + } + } + + // Second run with different shape [1, 1, 6] + { + std::array x_values = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + std::array expected = {3.0f, 6.0f, 9.0f, 12.0f, 15.0f, 18.0f}; + const std::array shape = {1, 1, 6}; + + auto input_x = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_y = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_z = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + + const char* input_names[] = {"X", "Y", "Z"}; + const char* output_names[] = {"M"}; + Ort::Value inputs[] = {std::move(input_x), std::move(input_y), std::move(input_z)}; + + auto outputs = session.Run(Ort::RunOptions{}, input_names, inputs, 3, output_names, 1); + ASSERT_EQ(outputs.size(), 1u); + + const float* output_data = outputs[0].GetTensorData(); + for (size_t i = 0; i < expected.size(); i++) { + EXPECT_NEAR(output_data[i], expected[i], 1e-5f) << "Run 2 mismatch at index " << i; + } + } + + // Third run with yet another shape [1, 2, 3] + { + std::array x_values = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + std::array expected = {3.0f, 6.0f, 9.0f, 12.0f, 15.0f, 18.0f}; + const std::array shape = {1, 2, 3}; + + auto input_x = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_y = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + auto input_z = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); + + const char* input_names[] = {"X", "Y", "Z"}; + const char* output_names[] = {"M"}; + Ort::Value inputs[] = {std::move(input_x), std::move(input_y), std::move(input_z)}; + + auto outputs = session.Run(Ort::RunOptions{}, input_names, inputs, 3, output_names, 1); + ASSERT_EQ(outputs.size(), 1u); + + const float* output_data = outputs[0].GetTensorData(); + for (size_t i = 0; i < expected.size(); i++) { + EXPECT_NEAR(output_data[i], expected[i], 1e-5f) << "Run 3 mismatch at index " << i; + } + } +} diff --git a/tests/testdata/TRTEP_test_model/mnist.onnx b/tests/testdata/TRTEP_test_model/mnist.onnx new file mode 100644 index 0000000000000000000000000000000000000000..fc1a3f733c6e6243dd23dacb125b7a372de55a50 GIT binary patch literal 26454 zcmce-XH*r@vMx%F3P=zMf)bRVAR-8?t^yS>5+s?$04fGV5X?$Wf+%7_5d(^VqN1We zS7AU5Ac{Go7%*eb%3J%KbNAUN+&9Mi^G5$zqpNGqRb4f^W`%F6$ZIPM@eLYjsMz1m z$jL2UkZmqkp{%jSi2QH8m>SA@tvV zwDtbihlX8(BIbq1^mpk0PkuAyfPWv^U&c*FtxQ%;X?SE*>_SI1wSUgwq}_GM{K&ZZ zb7L1q%#ZBv66zPbP|6b8&#?1fXKhXYxv?>h{r*#GrGF=w$qxz(`?q-psQq^y zZOwr2QNfP=|7Fm>6U-C>!so{R+o-j&YX6-}TibvB{J9a4Go79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AI9Lo_QPnzk~)PB*er-<%e^Q1-*6u zRKwro-%kG9=JzJyJ>kELnEcV@=s&qMm6w)~=lo3kgAWK)CKji3J%^!XPX8xOg}ig*dpFIGBN$2_zVfB*+Ak RNCFB*q6<2)a4`t*0ss-ID|-L{ literal 0 HcmV?d00001 diff --git a/tests/testdata/ort_github_issue_26272_dds.onnx b/tests/testdata/ort_github_issue_26272_dds.onnx new file mode 100644 index 0000000..371f99c --- /dev/null +++ b/tests/testdata/ort_github_issue_26272_dds.onnx @@ -0,0 +1,28 @@ + +:“ +( +datanonzeros nonzeros_node"NonZero +1 +nonzeros +nonzeros_ttranspose_node" Transpose +3 +data + +nonzeros_toutput gathernd_node"GatherND +test_graphZ +data + +d1 +d2b +output +  +nzrj +nonzeros + + +nzrj + +nonzeros_t + +nzr +B \ No newline at end of file diff --git a/tests/testdata/topk_and_multiple_graph_outputs.onnx b/tests/testdata/topk_and_multiple_graph_outputs.onnx new file mode 100644 index 0000000000000000000000000000000000000000..340c3d420d5746844be0bd3769a174b4e69de801 GIT binary patch literal 393 zcmdW?8(U zIYJ{dP(TSp09}P@53)A4oW!KmoMI_v-~1FM5Fx|~a-n-sVnK!$HwU8tyA{(KCMQO3 zEp8x_k--V Date: Tue, 16 Jun 2026 11:39:17 -0700 Subject: [PATCH 06/10] Remove RemoveCycleTest Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/tensorrt_basic_test.cc | 114 ----------------------------------- 1 file changed, 114 deletions(-) diff --git a/tests/tensorrt_basic_test.cc b/tests/tensorrt_basic_test.cc index 7c3a861..bbd1cc9 100644 --- a/tests/tensorrt_basic_test.cc +++ b/tests/tensorrt_basic_test.cc @@ -117,79 +117,6 @@ static std::string CreateAddModel(const std::vector& dims) { return model_data; } -// Build a model with Bool/logic ops: M = And(Not(Xor(X, Y)), Xor(Not(Xor(X, Y)), Z)) -// Tests graph partitioning with ops that may not all be TRT-supported. -// Input: X, Y, Z bool [dims...] -// Output: M bool [dims...] -static std::string CreateBoolLogicModel(const std::vector& dims) { - ONNX_NAMESPACE::ModelProto model; - model.set_ir_version(ONNX_NAMESPACE::Version::IR_VERSION); - auto* opset = model.add_opset_import(); - opset->set_domain(""); - opset->set_version(13); - - auto* graph = model.mutable_graph(); - graph->set_name("bool_logic_graph"); - - auto make_bool_type = [&](const std::vector& shape) { - ONNX_NAMESPACE::TypeProto type; - type.mutable_tensor_type()->set_elem_type(ONNX_NAMESPACE::TensorProto_DataType_BOOL); - for (auto d : shape) { - type.mutable_tensor_type()->mutable_shape()->add_dim()->set_dim_value(d); - } - return type; - }; - - auto bool_type = make_bool_type(dims); - - // Inputs - for (const char* name : {"X", "Y", "Z"}) { - auto* input = graph->add_input(); - input->set_name(name); - *input->mutable_type() = bool_type; - } - - // Output M - auto* output = graph->add_output(); - output->set_name("M"); - *output->mutable_type() = bool_type; - - // Node 1: xor1_out = Xor(X, Y) - auto* node1 = graph->add_node(); - node1->set_op_type("Xor"); - node1->set_name("xor1"); - node1->add_input("X"); - node1->add_input("Y"); - node1->add_output("xor1_out"); - - // Node 2: not_out = Not(xor1_out) - auto* node2 = graph->add_node(); - node2->set_op_type("Not"); - node2->set_name("not"); - node2->add_input("xor1_out"); - node2->add_output("not_out"); - - // Node 3: xor2_out = Xor(not_out, Z) - auto* node3 = graph->add_node(); - node3->set_op_type("Xor"); - node3->set_name("xor2"); - node3->add_input("not_out"); - node3->add_input("Z"); - node3->add_output("xor2_out"); - - // Node 4: M = And(not_out, xor2_out) - auto* node4 = graph->add_node(); - node4->set_op_type("And"); - node4->set_name("and"); - node4->add_input("not_out"); - node4->add_input("xor2_out"); - node4->add_output("M"); - - std::string model_data; - model.SerializeToString(&model_data); - return model_data; -} - // Create a synthetic EPContext model with a specific "source" attribute. static std::string CreateSyntheticEPContextModel(const std::string& source_attr, bool include_source_attr = true) { @@ -378,47 +305,6 @@ TEST_F(TensorrtBasicTest, FunctionTest) { } } -// Test inference with boolean logic ops: graph partitioning test. -// Adapted from TensorrtExecutionProviderTest.RemoveCycleTest -TEST_F(TensorrtBasicTest, RemoveCycleTest) { - std::vector dims = {1, 3, 2}; - auto model_data = CreateBoolLogicModel(dims); - auto model_path = WriteAndTrack(model_data, "trt_basic_removecycle_test.onnx"); - - auto session = CreateSession(model_path); - - // Prepare bool inputs - // ONNX bool tensors use 1 byte per element - std::array x_values = {true, false, true, false, true, false}; - std::array y_values = {true, true, false, true, false, false}; - std::array z_values = {true, false, true, false, true, false}; - const std::array shape = {1, 3, 2}; - - Ort::MemoryInfo cpu_mem = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); - auto input_x = Ort::Value::CreateTensor(cpu_mem, x_values.data(), x_values.size(), shape.data(), shape.size()); - auto input_y = Ort::Value::CreateTensor(cpu_mem, y_values.data(), y_values.size(), shape.data(), shape.size()); - auto input_z = Ort::Value::CreateTensor(cpu_mem, z_values.data(), z_values.size(), shape.data(), shape.size()); - - const char* input_names[] = {"X", "Y", "Z"}; - const char* output_names[] = {"M"}; - Ort::Value inputs[] = {std::move(input_x), std::move(input_y), std::move(input_z)}; - - auto outputs = session.Run(Ort::RunOptions{}, input_names, inputs, 3, output_names, 1); - - ASSERT_EQ(outputs.size(), 1u); - const bool* output_data = outputs[0].GetTensorData(); - - // Expected results: - // xor1 = X ^ Y = {0, 1, 1, 1, 1, 0} - // not = !xor1 = {1, 0, 0, 0, 0, 1} - // xor2 = not ^ Z = {0, 0, 1, 0, 1, 1} - // M = not & xor2 = {0, 0, 0, 0, 0, 1} - std::array expected = {false, false, false, false, false, true}; - for (size_t i = 0; i < expected.size(); i++) { - EXPECT_EQ(output_data[i], expected[i]) << "Mismatch at index " << i; - } -} - // Test that session reports correct number of outputs for models with multiple outputs. // Adapted from TensorrtExecutionProviderTest.TestSessionOutputs TEST_F(TensorrtBasicTest, TestSessionOutputs_MultipleOutputs) { From 7aaeed93cd259c164b042915276965e9c957486d Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Tue, 16 Jun 2026 12:32:37 -0700 Subject: [PATCH 07/10] Fix DynamicInputShapes test and disable DDSOutputTest - Use unique dim_param names per dynamic dimension to avoid TRT constraint conflicts when dims share the same symbolic name. - Add explicit profile shapes (min/max/opt) for dynamic shape test. - Disable DDSOutputTest: TRT EP doesn't support output allocator for data-dependent shape outputs yet. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/tensorrt_basic_test.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/tensorrt_basic_test.cc b/tests/tensorrt_basic_test.cc index bbd1cc9..406a9fd 100644 --- a/tests/tensorrt_basic_test.cc +++ b/tests/tensorrt_basic_test.cc @@ -72,9 +72,11 @@ static std::string CreateAddModel(const std::vector& dims) { auto make_float_type = [&](const std::vector& shape) { ONNX_NAMESPACE::TypeProto type; type.mutable_tensor_type()->set_elem_type(ONNX_NAMESPACE::TensorProto_DataType_FLOAT); + int dyn_idx = 0; for (auto d : shape) { if (d < 0) { - type.mutable_tensor_type()->mutable_shape()->add_dim()->set_dim_param("dynamic"); + type.mutable_tensor_type()->mutable_shape()->add_dim()->set_dim_param( + "dynamic_" + std::to_string(dyn_idx++)); } else { type.mutable_tensor_type()->mutable_shape()->add_dim()->set_dim_value(d); } @@ -335,7 +337,9 @@ TEST_F(TensorrtBasicTest, TestSessionOutputs_UnusedNodeOutput) { // Test inference with a model that has data-dependent shape (DDS) output. // Adapted from TensorrtExecutionProviderTest.DDSOutputTest -TEST_F(TensorrtBasicTest, DDSOutputTest) { +// Disabled: TRT EP currently doesn't support output allocator for data-dependent shape (DDS) outputs. +// TensorRT requires setOutputAllocator for DDS outputs, which is not yet implemented in the plugin EP. +TEST_F(TensorrtBasicTest, DISABLED_DDSOutputTest) { auto testdata_dir = GetTestDataDir(); auto model_path = testdata_dir / "ort_github_issue_26272_dds.onnx"; if (!std::filesystem::exists(model_path)) { @@ -592,7 +596,13 @@ TEST_F(TensorrtBasicTest, DynamicInputShapes) { auto model_data = CreateAddModel(dims); auto model_path = WriteAndTrack(model_data, "trt_basic_dynamic_shape_test.onnx"); - auto session = CreateSession(model_path); + // Provide explicit profile shapes to cover the range of shapes we'll test + std::unordered_map ep_options; + ep_options["trt_profile_min_shapes"] = "X:1x1x1,Y:1x1x1,Z:1x1x1"; + ep_options["trt_profile_max_shapes"] = "X:1x6x6,Y:1x6x6,Z:1x6x6"; + ep_options["trt_profile_opt_shapes"] = "X:1x3x2,Y:1x3x2,Z:1x3x2"; + + auto session = CreateSession(model_path, ep_options); Ort::MemoryInfo cpu_mem = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); From eac49776b7e672c5b6065ff95aef78ff5c9d88f7 Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Tue, 16 Jun 2026 12:46:44 -0700 Subject: [PATCH 08/10] Add CUDA graph unit tests to CI pipelines - Enable ORTTensorRTEp_BUILD_TESTS=ON in build-trtep job - Copy trt_ep_tests binary to artifact upload directory - Add 'Run CUDA graph tests' step in run-tests job - Copy onnxruntime runtime library for test execution - Include CUDA graph test XML results in artifact upload - Apply changes to both Windows and Linux workflows Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/linux_x64_cuda.yml | 18 ++++++++++++++++++ .github/workflows/windows_x64_cuda.yml | 25 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/.github/workflows/linux_x64_cuda.yml b/.github/workflows/linux_x64_cuda.yml index bb94f9f..c845c07 100644 --- a/.github/workflows/linux_x64_cuda.yml +++ b/.github/workflows/linux_x64_cuda.yml @@ -179,10 +179,14 @@ jobs: -DCMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES} \ -DCMAKE_CUDA_COMPILER=${CUDA_HOME}/bin/nvcc \ -DTENSORRT_HOME=${TRT_HOME} \ + -DORTTensorRTEp_BUILD_TESTS=ON \ -S . -B out/build cmake --build out/build -j `nproc` cmake --install out/build + # Copy test binary to install directory for artifact upload + cp out/build/trt_ep_tests out/${ARTIFACT_NAME}/bin/ 2>/dev/null || true + - name: Upload artifacts uses: actions/upload-artifact@v7 with: @@ -370,6 +374,19 @@ jobs: "$GITHUB_WORKSPACE/onnxruntime/onnxruntime_provider_test" \ "${{ env.ARTIFACT_NAME }}" + - name: Run CUDA graph tests + env: + TRT_EP_LIBRARY_PATH: ${{ env.TRTEP_LIBRARY_PATH }} + LD_LIBRARY_PATH: "${{ github.workspace }}/onnxruntime:${{ github.workspace }}/orttrtep/lib:$LD_LIBRARY_PATH" + run: | + TEST_EXE="$GITHUB_WORKSPACE/orttrtep/bin/trt_ep_tests" + if [ -f "$TEST_EXE" ]; then + chmod +x "$TEST_EXE" + "$TEST_EXE" --gtest_output=xml:cuda_graph_test_results.xml + else + echo "WARNING: trt_ep_tests not found, skipping CUDA graph tests" + fi + - name: Upload build artifacts if: ${{ !cancelled() }} uses: actions/upload-artifact@v7 @@ -378,3 +395,4 @@ jobs: path: | ${{ env.ARTIFACT_NAME }}.xml ${{ env.ARTIFACT_NAME }}.log + cuda_graph_test_results.xml diff --git a/.github/workflows/windows_x64_cuda.yml b/.github/workflows/windows_x64_cuda.yml index bcdb21a..8f76e41 100644 --- a/.github/workflows/windows_x64_cuda.yml +++ b/.github/workflows/windows_x64_cuda.yml @@ -104,6 +104,7 @@ jobs: -DCMAKE_CUDA_COMPILER=${{ runner.temp }}\v${{ matrix.cuda_version }}\bin\nvcc.exe ^ -DCMAKE_CUDA_ARCHITECTURES=${{ env.CMAKE_CUDA_ARCHITECTURES }} ^ -DTENSORRT_HOME=${{ runner.temp }}\TensorRT-${{ matrix.trt_version }}.Windows.win10.cuda-${{ matrix.cuda_version }} ^ + -DORTTensorRTEp_BUILD_TESTS=ON ^ -S . -B out/build if %errorlevel% neq 0 exit /b %errorlevel% @@ -111,6 +112,11 @@ jobs: if %errorlevel% neq 0 exit /b %errorlevel% cmake --install out/build + :: Copy test binary to install directory for artifact upload + copy out\build\trt_ep_tests.exe out\%ARTIFACT_NAME%\bin\ 2>nul || ( + copy out\build\%BUILD_TYPE%\trt_ep_tests.exe out\%ARTIFACT_NAME%\bin\ 2>nul + ) + - name: Upload artifacts uses: actions/upload-artifact@v7 with: @@ -327,6 +333,24 @@ jobs: exit $lastExitCode } + - name: Run CUDA graph tests + shell: pwsh + env: + TRT_EP_LIBRARY_PATH: ${{ env.TRTEP_LIBRARY_PATH }} + run: | + $testExe = "${{ github.workspace }}\orttrtep\bin\trt_ep_tests.exe" + if (Test-Path $testExe) { + # Copy onnxruntime.dll to same directory as test exe so it's found + Copy-Item "${{ github.workspace }}\onnxruntime\onnxruntime.dll" ` + "${{ github.workspace }}\orttrtep\bin\onnxruntime.dll" -ErrorAction SilentlyContinue + & $testExe --gtest_output=xml:cuda_graph_test_results.xml + if ($lastExitCode -ne 0) { + exit $lastExitCode + } + } else { + Write-Warning "trt_ep_tests.exe not found, skipping CUDA graph tests" + } + - name: Upload build artifacts if: ${{ !cancelled() }} uses: actions/upload-artifact@v7 @@ -335,3 +359,4 @@ jobs: path: | ${{ env.ARTIFACT_NAME }}.xml ${{ env.ARTIFACT_NAME }}.log + cuda_graph_test_results.xml From a7debf4955e5314e7ec52dbece970b6b515e6485 Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Tue, 16 Jun 2026 12:53:28 -0700 Subject: [PATCH 09/10] Update CI pipelines to run all unit tests with testdata - Rename 'Run CUDA graph tests' step to 'Run unit tests' since the binary now includes both CUDA graph and TensorRT basic tests. - Copy testdata directory alongside test binary in build artifacts. - Set TESTDATA_DIR env var so tests can find model files. - Update artifact upload to use new XML result filename. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/linux_x64_cuda.yml | 12 +++++++----- .github/workflows/windows_x64_cuda.yml | 14 +++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux_x64_cuda.yml b/.github/workflows/linux_x64_cuda.yml index c845c07..95ae7a7 100644 --- a/.github/workflows/linux_x64_cuda.yml +++ b/.github/workflows/linux_x64_cuda.yml @@ -184,8 +184,9 @@ jobs: cmake --build out/build -j `nproc` cmake --install out/build - # Copy test binary to install directory for artifact upload + # Copy test binary and testdata to install directory for artifact upload cp out/build/trt_ep_tests out/${ARTIFACT_NAME}/bin/ 2>/dev/null || true + cp -r out/build/testdata out/${ARTIFACT_NAME}/bin/testdata 2>/dev/null || true - name: Upload artifacts uses: actions/upload-artifact@v7 @@ -374,17 +375,18 @@ jobs: "$GITHUB_WORKSPACE/onnxruntime/onnxruntime_provider_test" \ "${{ env.ARTIFACT_NAME }}" - - name: Run CUDA graph tests + - name: Run unit tests env: TRT_EP_LIBRARY_PATH: ${{ env.TRTEP_LIBRARY_PATH }} + TESTDATA_DIR: "${{ github.workspace }}/orttrtep/bin/testdata" LD_LIBRARY_PATH: "${{ github.workspace }}/onnxruntime:${{ github.workspace }}/orttrtep/lib:$LD_LIBRARY_PATH" run: | TEST_EXE="$GITHUB_WORKSPACE/orttrtep/bin/trt_ep_tests" if [ -f "$TEST_EXE" ]; then chmod +x "$TEST_EXE" - "$TEST_EXE" --gtest_output=xml:cuda_graph_test_results.xml + "$TEST_EXE" --gtest_output=xml:trt_ep_unit_test_results.xml else - echo "WARNING: trt_ep_tests not found, skipping CUDA graph tests" + echo "WARNING: trt_ep_tests not found, skipping unit tests" fi - name: Upload build artifacts @@ -395,4 +397,4 @@ jobs: path: | ${{ env.ARTIFACT_NAME }}.xml ${{ env.ARTIFACT_NAME }}.log - cuda_graph_test_results.xml + trt_ep_unit_test_results.xml diff --git a/.github/workflows/windows_x64_cuda.yml b/.github/workflows/windows_x64_cuda.yml index 8f76e41..df2ff19 100644 --- a/.github/workflows/windows_x64_cuda.yml +++ b/.github/workflows/windows_x64_cuda.yml @@ -112,10 +112,13 @@ jobs: if %errorlevel% neq 0 exit /b %errorlevel% cmake --install out/build - :: Copy test binary to install directory for artifact upload + :: Copy test binary and testdata to install directory for artifact upload copy out\build\trt_ep_tests.exe out\%ARTIFACT_NAME%\bin\ 2>nul || ( copy out\build\%BUILD_TYPE%\trt_ep_tests.exe out\%ARTIFACT_NAME%\bin\ 2>nul ) + xcopy out\build\testdata out\%ARTIFACT_NAME%\bin\testdata\ /E /I /Q 2>nul || ( + xcopy out\build\%BUILD_TYPE%\testdata out\%ARTIFACT_NAME%\bin\testdata\ /E /I /Q 2>nul + ) - name: Upload artifacts uses: actions/upload-artifact@v7 @@ -333,22 +336,23 @@ jobs: exit $lastExitCode } - - name: Run CUDA graph tests + - name: Run unit tests shell: pwsh env: TRT_EP_LIBRARY_PATH: ${{ env.TRTEP_LIBRARY_PATH }} + TESTDATA_DIR: '${{ github.workspace }}\orttrtep\bin\testdata' run: | $testExe = "${{ github.workspace }}\orttrtep\bin\trt_ep_tests.exe" if (Test-Path $testExe) { # Copy onnxruntime.dll to same directory as test exe so it's found Copy-Item "${{ github.workspace }}\onnxruntime\onnxruntime.dll" ` "${{ github.workspace }}\orttrtep\bin\onnxruntime.dll" -ErrorAction SilentlyContinue - & $testExe --gtest_output=xml:cuda_graph_test_results.xml + & $testExe --gtest_output=xml:trt_ep_unit_test_results.xml if ($lastExitCode -ne 0) { exit $lastExitCode } } else { - Write-Warning "trt_ep_tests.exe not found, skipping CUDA graph tests" + Write-Warning "trt_ep_tests.exe not found, skipping unit tests" } - name: Upload build artifacts @@ -359,4 +363,4 @@ jobs: path: | ${{ env.ARTIFACT_NAME }}.xml ${{ env.ARTIFACT_NAME }}.log - cuda_graph_test_results.xml + trt_ep_unit_test_results.xml From 4af39366953462f9eb952aec6254f4d97decf815 Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Tue, 16 Jun 2026 13:22:00 -0700 Subject: [PATCH 10/10] Fix DDS output support: clear allocator map on context recreation When the TRT execution context is recreated (due to engine rebuild from shape changes), the DDS output allocator map retained entries from the old context. On subsequent runs, the code saw known_DDS=true and skipped calling setOutputAllocator on the new context, causing enqueueV3 to fail with 'Neither address or allocator is set for output tensor'. Fix: clear dds_output_allocator_map when context_update recreates the execution context, so allocators are re-registered on the new context. Also re-enables DDSOutputTest which now passes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/tensorrt_execution_provider.cc | 4 ++++ tests/tensorrt_basic_test.cc | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/tensorrt_execution_provider.cc b/src/tensorrt_execution_provider.cc index 3ea0b33..ba7e815 100644 --- a/src/tensorrt_execution_provider.cc +++ b/src/tensorrt_execution_provider.cc @@ -3661,6 +3661,10 @@ OrtStatus* TRTEpNodeComputeInfo::ComputeImpl(OrtNodeComputeInfo* this_ptr, void* return ep.ort_api.CreateStatus(ORT_EP_FAIL, err_msg.c_str()); } trt_context = trt_state->context->get(); + + // Clear DDS output allocator map since the old allocators were registered on + // the previous context. They need to be re-registered on the new context. + dds_output_allocator_map.clear(); } // Check before using trt_engine diff --git a/tests/tensorrt_basic_test.cc b/tests/tensorrt_basic_test.cc index 406a9fd..39a4cc0 100644 --- a/tests/tensorrt_basic_test.cc +++ b/tests/tensorrt_basic_test.cc @@ -337,9 +337,9 @@ TEST_F(TensorrtBasicTest, TestSessionOutputs_UnusedNodeOutput) { // Test inference with a model that has data-dependent shape (DDS) output. // Adapted from TensorrtExecutionProviderTest.DDSOutputTest -// Disabled: TRT EP currently doesn't support output allocator for data-dependent shape (DDS) outputs. -// TensorRT requires setOutputAllocator for DDS outputs, which is not yet implemented in the plugin EP. -TEST_F(TensorrtBasicTest, DISABLED_DDSOutputTest) { +// Test inference with a model that has data-dependent shape (DDS) output. +// Adapted from TensorrtExecutionProviderTest.DDSOutputTest +TEST_F(TensorrtBasicTest, DDSOutputTest) { auto testdata_dir = GetTestDataDir(); auto model_path = testdata_dir / "ort_github_issue_26272_dds.onnx"; if (!std::filesystem::exists(model_path)) {