黄蓝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 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 SetOptions(const std::vector<std::shared_ptr<void>>& options) = 0;
virtual OH_NN_ReturnCode GetModelName(std::string& modelName) virtual OH_NN_ReturnCode GetModelName(std::string& modelName) = 0;
{
return OH_NN_UNSUPPORTED;
}
}; };
} // namespace NeuralNetworkRuntime } // namespace NeuralNetworkRuntime
} // namespace OHOS } // namespace OHOS

View File

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