mirror of
https://gitee.com/openharmony/ai_neural_network_runtime
synced 2024-12-04 22:16:34 +00:00
黄蓝master同步
Signed-off-by: w30052974 <wangyifan94@huawei.com>
This commit is contained in:
parent
1b26d4aa9c
commit
0432e5f929
@ -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
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user