From 82ae393ef86b1a145fd9815edd86cd6fab09d432 Mon Sep 17 00:00:00 2001 From: Xianzhi Yu Date: Fri, 15 Jul 2022 20:24:46 +0800 Subject: [PATCH] fix latest version gpu preprocess bug --- inference/engine/src/bolt.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inference/engine/src/bolt.cpp b/inference/engine/src/bolt.cpp index 12218319..9eab578e 100644 --- a/inference/engine/src/bolt.cpp +++ b/inference/engine/src/bolt.cpp @@ -607,7 +607,7 @@ void PrepareModel5D(ModelHandle ih, std::map modelInputDims = getInputDataFormatFromUser(ih, num_inputs, name, n, c, t, h, w, dt, df); - //cnn->loadAlgorithmMap((const char *)ihInfo->algoPath, ihInfo->useFileStream); + cnn->loadAlgorithmMap((const char *)ihInfo->algoPath, ihInfo->useFileStream); cnn->ready(modelInputDims); cnn->mark_input_output(); @@ -940,10 +940,10 @@ void DestroyModel(ModelHandle ih) CNN *cnn = (CNN *)ihInfo->cnn; assert_not_nullptr(__FUNCTION__, "ModelHandle.cnn", cnn); if (cnn != nullptr) { - //if (ihInfo->algoPath != nullptr && !ihInfo->useFileStream) { - // const char *algoPath = (const char *)ihInfo->algoPath; - // UNI_THREAD_SAFE(cnn->saveAlgorithmMapToFile(algoPath)); - //} + if (ihInfo->algoPath != nullptr && !ihInfo->useFileStream) { + const char *algoPath = (const char *)ihInfo->algoPath; + UNI_THREAD_SAFE(cnn->saveAlgorithmMapToFile(algoPath)); + } delete cnn; ihInfo->cnn = nullptr; }