diff --git a/cmake/external/onnx-tensorrt b/cmake/external/onnx-tensorrt index 8b8b89d184..177a2e470c 160000 --- a/cmake/external/onnx-tensorrt +++ b/cmake/external/onnx-tensorrt @@ -1 +1 @@ -Subproject commit 8b8b89d18423cae7bb8a6a95ea346dd49a4dccc0 +Subproject commit 177a2e470ca28433b8d8ca30e44f79b373f2407e diff --git a/dockerfiles/README.md b/dockerfiles/README.md index 8c5ab38a90..cb36b8c40f 100644 --- a/dockerfiles/README.md +++ b/dockerfiles/README.md @@ -80,7 +80,7 @@ Use `docker pull` with any of the images and tags below to pull an image and try ``` ## TensorRT -**Ubuntu 18.04, CUDA 10.1.243, TensorRT 6.0.1** +**Ubuntu 18.04, CUDA 10.2, TensorRT 7.0.0** 1. Build the docker image from the Dockerfile in this repository. ``` diff --git a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc index b1de06881f..e6c34ae9d5 100644 --- a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc +++ b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc @@ -335,7 +335,7 @@ std::unique_ptr TensorrtExecutionProvider::GetSubGraph(SubGraph // Assign inputs and outputs to subgraph's meta_def auto meta_def = onnxruntime::make_unique<::onnxruntime::IndexedSubGraph::MetaDef>(); - meta_def->name = "TRTKernel_" + std::to_string(kernels_index++); + meta_def->name = "TRTKernel_" + graph.Name() + "_" + std::to_string(kernels_index++); meta_def->domain = kMSDomain; for (const auto& input : inputs) { @@ -454,6 +454,12 @@ SubGraphCollection_t TensorrtExecutionProvider::GetSupportedList(SubGraphCollect std::string string_buf; model_proto.SerializeToString(&string_buf); + if (dump_subgraphs_) { + // Dump TensorRT subgraph for debugging if enabled via ORT_TENSORRT_DUMP_SUBGRAPHS env variable. + std::fstream dump("TensorrtExecutionProvider_TRT_Subgraph.onnx", std::ios::out | std::ios::trunc | std::ios::binary); + model_proto.SerializeToOstream(&dump); + } + // Get supported node list recursively SubGraphCollection_t parser_nodes_list; TensorrtLogger& trt_logger = GetTensorrtLogger();