From: Inki Dae Date: Wed, 25 Nov 2020 05:27:00 +0000 (+0900) Subject: Stop profiling if inference failed X-Git-Tag: submit/tizen/20201125.055433^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F248282%2F1;p=platform%2Fcore%2Fmultimedia%2Finference-engine-interface.git Stop profiling if inference failed Change-Id: I4ed0f45e7f34677470f81c2161370ff89d15f467 Signed-off-by: Inki Dae --- diff --git a/src/inference_engine_common_impl.cpp b/src/inference_engine_common_impl.cpp index 8003165..d4d903b 100644 --- a/src/inference_engine_common_impl.cpp +++ b/src/inference_engine_common_impl.cpp @@ -455,8 +455,10 @@ out: } int ret = mBackendHandle->Load(model_paths, model_format); - if (ret != INFERENCE_ENGINE_ERROR_NONE) + if (ret != INFERENCE_ENGINE_ERROR_NONE) { LOGE("Fail to load InferenceEngineVision"); + mUseProfiler = false; + } if (mUseProfiler == true) { mProfiler->Stop(IE_PROFILER_LATENCY, "Load"); @@ -613,6 +615,10 @@ out: } int ret = mBackendHandle->Run(input_buffers, output_buffers); + if (ret != INFERENCE_ENGINE_ERROR_NONE) { + LOGE("Failed to inference."); + mUseProfiler = false; + } if (mUseProfiler == true) { mProfiler->Stop(IE_PROFILER_LATENCY, "Run");