From 04baad7ebebac217483ff8c2fb45297305b4df59 Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Fri, 24 Nov 2023 17:45:14 +0000 Subject: [PATCH] fix format --- onnxruntime/core/providers/tensorrt/onnx_ctx_model_helper.cc | 2 +- .../core/providers/tensorrt/tensorrt_execution_provider.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/onnxruntime/core/providers/tensorrt/onnx_ctx_model_helper.cc b/onnxruntime/core/providers/tensorrt/onnx_ctx_model_helper.cc index fa72c20b07827..082d95066d523 100644 --- a/onnxruntime/core/providers/tensorrt/onnx_ctx_model_helper.cc +++ b/onnxruntime/core/providers/tensorrt/onnx_ctx_model_helper.cc @@ -124,7 +124,7 @@ ONNX_NAMESPACE::ModelProto* CreateCtxNodeModel(const GraphViewer& graph_viewer, node_attributes->reserve(num_attributes); node_attributes->emplace(EMBED_MODE, *attr_0); node_attributes->emplace(EP_CACHE_CONTEXT, *attr_1); - + if (compute_capability_enable) { cudaDeviceProp prop; CUDA_CALL_THROW(cudaGetDeviceProperties(&prop, device_id)); diff --git a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc index 0e13b9a0b8052..1fd42fc5ce9de 100644 --- a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc +++ b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc @@ -3530,7 +3530,8 @@ Status TensorrtExecutionProvider::CreateNodeComputeFromGraph(const GraphViewer& LOGS_DEFAULT(VERBOSE) << "[TensorRT EP] Serialized timing cache " + timing_cache_path; } } - + + // dump ep context model if (dump_ep_context_model_ && ep_context_embed_mode_) { UpdateCtxNodeModelEngineContext(model_proto_.get(), reinterpret_cast(serialized_engine->data()), serialized_engine->size()); DumpCtxNodeModel(model_proto_.get(), cache_path_prefix);