Skip to content

Commit

Permalink
Merge pull request #117 from yuxianzhi/patch-24
Browse files Browse the repository at this point in the history
fix latest version gpu preprocess bug
  • Loading branch information
jianfeifeng authored Jul 17, 2022
2 parents f01d046 + 82ae393 commit fb9621f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions inference/engine/src/bolt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ void PrepareModel5D(ModelHandle ih,

std::map<std::string, TensorDesc> 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();

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit fb9621f

Please sign in to comment.