From: Inki Dae Date: Fri, 11 Sep 2020 07:20:22 +0000 (+0900) Subject: Add ARMNN and TFLITE backend support X-Git-Tag: submit/tizen/20201104.021236~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d18e3428d6172b45a82e88651c15fb16ba19cdcd;p=platform%2Fcore%2Fmultimedia%2Finference-engine-mlapi.git Add ARMNN and TFLITE backend support Change-Id: I2fde5e660950a3e2d9d2d1722c351cdd448f86a4 Signed-off-by: Inki Dae --- diff --git a/src/inference_engine_mlapi.cpp b/src/inference_engine_mlapi.cpp index 29913e5..1a191b8 100644 --- a/src/inference_engine_mlapi.cpp +++ b/src/inference_engine_mlapi.cpp @@ -63,7 +63,7 @@ namespace MLAPIImpl inference_backend_type_e type = *(static_cast(data)); - if (INFERENCE_BACKEND_ONE != type && INFERENCE_BACKEND_MLAPI != type) { + if (INFERENCE_BACKEND_NONE >= type || INFERENCE_BACKEND_MAX <= type) { LOGE("Invalid backend type."); return INFERENCE_ENGINE_ERROR_NOT_SUPPORTED; } @@ -139,7 +139,14 @@ namespace MLAPIImpl model_str += "," + model_paths[1]; break; case INFERENCE_BACKEND_ONE: - nnfw_type = ML_NNFW_TYPE_NNFW; + case INFERENCE_BACKEND_ARMNN: + case INFERENCE_BACKEND_TFLITE: + if (mPluginType == INFERENCE_BACKEND_ONE) + nnfw_type = ML_NNFW_TYPE_NNFW; + if (mPluginType == INFERENCE_BACKEND_ARMNN) + nnfw_type = ML_NNFW_TYPE_ARMNN; + if (mPluginType == INFERENCE_BACKEND_TFLITE) + nnfw_type = ML_NNFW_TYPE_TENSORFLOW_LITE; if (access(model_str.c_str(), R_OK)) { LOGE("model file path in [%s]", model_str.c_str());