nnstreamer_filter_tflite_deps = [tflite_dep, thread_dep, libdl_dep, glib_dep, gst_dep, nnstreamer_dep]
- if get_option('enable-nnfw')
- nnapi_lib = dependency('nnfw', required: true)
- if nnapi_lib.found()
- nnstreamer_filter_tflite_deps += nnapi_lib
+ if get_option('enable-tflite-nnapi-delegation')
+ nnfw_nnapi_lib = dependency('nnfw', required: true)
+ if nnfw_nnapi_lib.found()
+ nnstreamer_filter_tflite_deps += nnfw_nnapi_lib
else
error('Cannot find nnfw')
endif
interpreter->UseNNAPI(use_nnapi);
-#ifdef ENABLE_NNFW
+#ifdef ENABLE_TFLITE_NNAPI_DELEGATE
if (use_nnapi) {
nnfw_delegate.reset (new ::nnfw::tflite::NNAPIDelegate);
if (nnfw_delegate->BuildGraph (interpreter.get()) != kTfLiteOk) {
tensors_idx.push_back (tensor_idx);
}
-#ifdef ENABLE_NNFW
+#ifdef ENABLE_TFLITE_NNAPI_DELEGATE
if (use_nnapi)
status = nnfw_delegate->Invoke (interpreter.get());
else
#include <tensorflow/contrib/lite/model.h>
#include <tensorflow/contrib/lite/kernels/register.h>
-#ifdef ENABLE_NNFW
+#ifdef ENABLE_TFLITE_NNAPI_DELEGATE
#include "tflite/ext/nnapi_delegate.h"
#endif
std::unique_ptr <tflite::Interpreter> interpreter;
std::unique_ptr <tflite::FlatBufferModel> model;
-#ifdef ENABLE_NNFW
+#ifdef ENABLE_TFLITE_NNAPI_DELEGATE
std::unique_ptr <nnfw::tflite::NNAPIDelegate> nnfw_delegate;
#endif
endif
endif
-# nnfw ( details in https://review.tizen.org/gerrit/p/platform/core/ml/nnfw )
-if get_option('enable-nnfw')
- add_project_arguments('-DENABLE_NNFW=1', language: ['c', 'cpp'])
- # For tf-lite/nnapi, enable-nnfw allows to use nnfw as a backend.
- # This also enables nnfw as a subplugin for Tizen.
+# nnfw-runtime ( details in https://review.tizen.org/gerrit/p/platform/core/ml/nnfw )
+if get_option('enable-nnfw-runtime')
+ add_project_arguments('-DENABLE_NNFW_RUNTIME=1', language: ['c', 'cpp'])
+ # This enables nnfw as a subplugin for Tizen.
+endif
+
+# nnfw-runtime ( details in https://review.tizen.org/gerrit/p/platform/core/ml/nnfw )
+if get_option('enable-tflite-nnapi-delegation')
+ add_project_arguments('-DENABLE_TFLITE_NNAPI_DELEGATION=1', language: ['c', 'cpp'])
+ # For tf-lite/nnapi, enable-nnfw allows to use nnfw::tflite::nnapi as a backend.
endif
# Build nnstreamer (common, plugins)
option('enable-tizen', type: 'boolean', value: false)
option('enable-element-restriction', type: 'boolean', value: false) # true to restrict gst-elements in api
option('restricted-elements', type: 'string', value: '')
-option('enable-nnfw', type: 'boolean', value: false)
-option('enable-nnfw-runtime', type: 'boolean', value: false)
+option('enable-tflite-nnapi-delegation', type: 'boolean', value: false) # true to enable tensorflow-lite to delegate nnapi interpretation to nnfw backend in tizen
+option('enable-nnfw-runtime', type: 'boolean', value: false) # true to enable nnfw tensor filter element
option('enable-cppfilter', type: 'boolean', value: true)
option('enable-tizen-sensor', type: 'boolean', value: false)