黄蓝master同步

Signed-off-by: w30052974 <wangyifan94@huawei.com>
This commit is contained in:
w30052974 2024-09-20 10:18:22 +08:00
parent 1b26d4aa9c
commit 0432e5f929
2 changed files with 3 additions and 7 deletions

View File

@ -46,10 +46,7 @@ public:
virtual OH_NN_ReturnCode SetExtensionConfig(const std::unordered_map<std::string, std::vector<char>>& configs) = 0;
virtual OH_NN_ReturnCode SetOptions(const std::vector<std::shared_ptr<void>>& options) = 0;
virtual OH_NN_ReturnCode GetModelName(std::string& modelName)
{
return OH_NN_UNSUPPORTED;
}
virtual OH_NN_ReturnCode GetModelName(std::string& modelName) = 0;
};
} // namespace NeuralNetworkRuntime
} // namespace OHOS

View File

@ -624,8 +624,7 @@ OH_NN_ReturnCode GetNnrtModelId(Compilation* compilationImpl, NNRtServiceApi& nn
std::string modelName;
OH_NN_ReturnCode retCode = compilationImpl->compiler->GetModelName(modelName);
if (retCode != OH_NN_SUCCESS) {
LOGE("GetModelName is failed.");
return retCode;
LOGW("GetModelName is failed.");
}
if (compilationImpl->nnModel != nullptr) {
@ -692,7 +691,7 @@ OH_NN_ReturnCode GetModelId(Compilation** compilation)
auto ret = GetNnrtModelId(compilationImpl, nnrtService);
if (ret != OH_NN_SUCCESS) {
LOGE("GetNnrtModelId failed.");
LOGE("GetNnrtModelId is failed.");
return ret;
}