From 993b2ad5938a62a249fadf804721b78787150bc1 Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Fri, 3 Nov 2023 18:04:14 +0000 Subject: [PATCH] change function name --- .../providers/tensorrt/tensorrt_execution_provider.cc | 9 +++++---- .../tensorrt/tensorrt_execution_provider_utils.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc index 278ee8f5a9f1f..f8b23b6bc3b2d 100644 --- a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc +++ b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc @@ -2199,13 +2199,14 @@ TensorrtExecutionProvider::GetCapability(const GraphViewer& graph, // If the model consists of only a single "EPContext" contrib op, it means TRT EP can fetch the precompiled engine info from the node and // load the engine directly without having to go through the processes of graph proto reconstruction, calling TRT parser and engine compilation. // So, simply return the ComputeCapability here. - if (HasPrecompiledEngine(graph)) { - if (IsValidEPContextNode(graph)) { + if (IsFusedGraphHasCtxNode(graph)) { + if (IsValidCtxNode(graph)) { SubGraph_t supported_node_vector = {{0}, false}; std::unique_ptr sub_graph = GetSubGraph(supported_node_vector, graph, TRTGenerateId(graph), 0); result.push_back(ComputeCapability::Create(std::move(sub_graph))); + } else { + LOGS_DEFAULT(ERROR) << "[TensorRT EP] It's not a valid EP context contrib op"; } - LOGS_DEFAULT(ERROR) << "[TensorRT EP] It's not a valid EP context contrib op"; return result; } @@ -3674,7 +3675,7 @@ common::Status TensorrtExecutionProvider::Compile(const std::vectorOpType() == EP_CONTEXT_OP_TYPE); auto node = graph.GetNode(0);