mirror of
https://gitee.com/openharmony/ai_neural_network_runtime
synced 2024-12-04 05:50:44 +00:00
commit
17a0cec2f0
@ -1244,6 +1244,11 @@ OH_NN_ReturnCode Scheduling(Compilation** compilation)
|
||||
return OH_NN_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
std::string cachePath = "";
|
||||
if (compilationImpl->cachePath != nullptr) {
|
||||
cachePath = compilationImpl->cachePath;
|
||||
}
|
||||
|
||||
bool supportStat = false;
|
||||
int ret = nnrtService.IsSupportScheduling(&supportStat);
|
||||
if (ret != static_cast<int>(OH_NN_SUCCESS)) {
|
||||
@ -1261,7 +1266,7 @@ OH_NN_ReturnCode Scheduling(Compilation** compilation)
|
||||
}
|
||||
|
||||
bool needModelLatency = false;
|
||||
ret = nnrtService.Scheduling(compilationImpl->hiaiModelId, &needModelLatency);
|
||||
ret = nnrtService.Scheduling(compilationImpl->hiaiModelId, &needModelLatency, cachePath.c_str());
|
||||
if (ret != static_cast<int>(OH_NN_SUCCESS)) {
|
||||
LOGE("Scheduling failed, some error happened when scheduling.");
|
||||
return static_cast<OH_NN_ReturnCode>(ret);
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
int (*IsSupportAuthentication)(bool* supportStat) = nullptr;
|
||||
int (*IsSupportScheduling)(bool* supportStat) = nullptr;
|
||||
int (*Authentication)(int callingPid) = nullptr;
|
||||
int (*Scheduling)(uint32_t hiaiModelId, bool* needModelLatency) = nullptr;
|
||||
int (*Scheduling)(uint32_t hiaiModelId, bool* needModelLatency, const char* cachePath) = nullptr;
|
||||
int (*UpdateModelLatency)(uint32_t hiaiModelId, int modelLatency) = nullptr;
|
||||
int (*Unload)(uint32_t hiaiModelId) = nullptr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user