MV_INFERENCE_BACKEND_MLAPI with MV_INFERENCE_TARGET_DEVICE_CUSTOM condition only... 47/254947/1
authorTae-Young Chung <ty83.chung@samsung.com>
Thu, 11 Mar 2021 02:19:37 +0000 (11:19 +0900)
committerTae-Young Chung <ty83.chung@samsung.com>
Thu, 11 Mar 2021 02:19:41 +0000 (11:19 +0900)
Change-Id: Ie73cfc3488360d8a5cde0c2c52f92900410b4f7c
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
mv_inference/inference/include/Inference.h
mv_inference/inference/src/mv_inference_open.cpp

index 27f8f03..320087b 100644 (file)
@@ -322,6 +322,11 @@ namespace inference
                        engine_config = config;
                }
 
+               int GetTargetType()
+               {
+                       return mConfig.mTargetTypes;
+               }
+
        private:
                bool mCanRun; /**< The flag indicating ready to run Inference */
                InferenceConfig mConfig;
index 57ec8fd..c2011b4 100644 (file)
@@ -175,6 +175,8 @@ int mv_inference_configure_model_open(mv_inference_h infer,
                 backendType < MV_INFERENCE_BACKEND_MAX) &&
                (backendType != MV_INFERENCE_BACKEND_TFLITE) &&
                (backendType != MV_INFERENCE_BACKEND_ARMNN) &&
+               (backendType == MV_INFERENCE_BACKEND_MLAPI &&
+               (pInfer->GetTargetType() & MV_INFERENCE_TARGET_DEVICE_CUSTOM)) &&
                (backendType != MV_INFERENCE_BACKEND_ONE)) {
                if (access(modelConfigFilePath, F_OK)) {
                        LOGE("modelConfigFilePath in [%s] ", modelConfigFilePath);