inference_backend_type_e type =
*(static_cast<inference_backend_type_e *>(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;
}
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());