From d5366c47a44d5401a235ae70d3b293ed1636aa03 Mon Sep 17 00:00:00 2001 From: JingZhuangzhuang <75348594+JZZ-NOTE@users.noreply.github.com> Date: Tue, 20 Dec 2022 20:00:01 +0800 Subject: [PATCH] reset context clear profile_num (#49188) --- paddle/fluid/inference/tensorrt/engine.h | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/fluid/inference/tensorrt/engine.h b/paddle/fluid/inference/tensorrt/engine.h index c1fa94ef42..e80f2e6ce5 100644 --- a/paddle/fluid/inference/tensorrt/engine.h +++ b/paddle/fluid/inference/tensorrt/engine.h @@ -326,6 +326,7 @@ class TensorRTEngine { std::unique_lock lock(mutex_); infer_context_[predictor_id_per_thread].reset(nullptr); infer_context_.erase(predictor_id_per_thread); + cur_profile_num_ = 0; } nvinfer1::IHostMemory* Serialize() { -- GitLab