return INFERENCE_ENGINE_ERROR_NOT_SUPPORTED;
}
+ if (access(model_str.c_str(), R_OK) ||
+ access(model_paths[1].c_str(), R_OK)) {
+ LOGE("model file path in [%s,%s], errno=%s", model_str.c_str(),
+ model_paths[1].c_str(),
+ strerror(errno));
+ return INFERENCE_ENGINE_ERROR_INVALID_PATH;
+ }
+
// ML Single API of MLAPI requires model_paths rule like below,
// "so library file path,nb model file path" or vise versa.
model_str += "," + model_paths[1];
case INFERENCE_BACKEND_ONE:
nnfw_type = ML_NNFW_TYPE_NNFW;
+ if (access(model_str.c_str(), R_OK)) {
+ LOGE("model file path in [%s], errno=%s", model_str.c_str(),
+ strerror(errno));
+ return INFERENCE_ENGINE_ERROR_INVALID_PATH;
+ }
+
if (mTargetDevice == INFERENCE_TARGET_CPU) {
nnfw_hw = ML_NNFW_HW_CPU_NEON;
LOGI("Target device is NEON.");
return INFERENCE_ENGINE_ERROR_INVALID_OPERATION;
}
- // TODO. Consider mutiple output tensors.
+ // TODO. Consider multiple output tensors.
err = ml_tensors_data_get_tensor_data(
output_data, 0, (void **) &output_buffers[0].buffer,