diff --git a/frameworks/native/neural_network_core/neural_network_core.cpp b/frameworks/native/neural_network_core/neural_network_core.cpp index 33cd09df186b013b81ce300dfcc837bf4b64d2ba..63fed5c04f46b6bf0223343de85c4db668870b24 100644 --- a/frameworks/native/neural_network_core/neural_network_core.cpp +++ b/frameworks/native/neural_network_core/neural_network_core.cpp @@ -752,9 +752,11 @@ NNRT_API OH_NN_ReturnCode OH_NNCompilation_Build(OH_NNCompilation *compilation) } NNRtServiceApi& nnrtService = NNRtServiceApi::GetInstance(); - bool retCode = nnrtService.PullUpDlliteService(); - if (!retCode) { - LOGI("OH_NNCompilation_Build failed, PullUpDlliteService failed."); + if (nnrtService.IsServiceAvaliable()) { + bool retCode = nnrtService.PullUpDlliteService(); + if (!retCode) { + LOGI("OH_NNCompilation_Build failed, PullUpDlliteService failed."); + } } configs["isExceedRamLimit"] = configContents;