diff --git a/paddle/fluid/framework/naive_executor.cc b/paddle/fluid/framework/naive_executor.cc index f9a7dedb5fdbac1a37ab7059d236c976b858c460..556a167e74f226bc838b020809ada790f464bfdd 100644 --- a/paddle/fluid/framework/naive_executor.cc +++ b/paddle/fluid/framework/naive_executor.cc @@ -62,7 +62,8 @@ void NaiveExecutor::Run() { << op->DebugStringEx(scope_) << " on scope " << scope_; op->SetIsCalledByExecutor(false); #ifdef PADDLE_WITH_INFERENCE_NVTX - platform::CudaNvtxRangePush(op->Type(), platform::NvtxRangeColor::Green); + platform::CudaNvtxRangePush(op->Type() + "|" + op->OutputVars(true).front(), + platform::NvtxRangeColor::Green); #endif // According to reuse table, we share the out tensor's holder. diff --git a/paddle/fluid/inference/tensorrt/engine.cc b/paddle/fluid/inference/tensorrt/engine.cc index 36e033a58aad0b741dc8d27851e4ba3521e2f81a..0c25b321c1d0be1e23ae722706b23825fb2f01be 100644 --- a/paddle/fluid/inference/tensorrt/engine.cc +++ b/paddle/fluid/inference/tensorrt/engine.cc @@ -148,7 +148,9 @@ void TensorRTEngine::FreezeNetwork() { platform::errors::InvalidArgument( "Call InitNetwork first to initialize network.")); // build engine. - infer_builder_->setMaxBatchSize(max_batch_); + if (!with_dynamic_shape_) { + infer_builder_->setMaxBatchSize(max_batch_); + } #if IS_TRT_VERSION_GE(8300) infer_builder_config_->setMemoryPoolLimit( nvinfer1::MemoryPoolType::kWORKSPACE, max_workspace_);