#include <algorithm>
#include <nnstreamer_plugin_api.h>
+#include <nnstreamer_conf.h>
#include "tensor_filter_tensorflow_lite_core.h"
/**
TFLiteCore::TFLiteCore (const char * _model_path)
{
model_path = _model_path;
+ use_nnapi = nnsconf_get_custom_value_bool ("tensorflowlite", "enable_nnapi", FALSE);
gst_tensors_info_init (&inputTensorMeta);
gst_tensors_info_init (&outputTensorMeta);
return -2;
}
+ /* Set inference path of tensorflow-lite */
+ interpreter->UseNNAPI (use_nnapi);
+
/** set allocation type to dynamic for in/out tensors */
int tensor_idx;
# It may break in some special cases (running tensorflow & nnstreamer in a chroot of a AWS VM); in such a case, keep it 0 or FALSE.
[tensorflow]
mem_optmz=@TF_MEM_OPTMZ@
+
+# Set 1 or TRUE if you want to use NNAPI with tensorflow-lite, which enables to use NNAPI backend, which may use GPU or NPU/TPU.
+[tensorflowlite]
+enable_nnapi=FALSE