SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(INC_DIR "${PROJECT_SOURCE_DIR}/include")
-SET(dependents "dlog inference-engine-interface-common tensorflow2-lite")
+SET(dependents "dlog inference-engine-interface-common")
INCLUDE(FindPkgConfig)
pkg_check_modules(${fw_name} REQUIRED ${dependents})
#Remove leading whitespace POLICY CMP0004
STRING(REGEX REPLACE "^ " "" EXTRA_LDFLAGS ${EXTRA_LDFLAGS})
-SET(CMAKE_C_FLAGS "-I./include -I./include/headers ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -w")
+SET(CMAKE_C_FLAGS "-I./include -I./include/headers ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -w")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
-SET(CMAKE_CXX_FLAGS "-I./include -I./include/headers -I/usr/include/tensorflow2/tensorflow ${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -fPIC")
+SET(CMAKE_CXX_FLAGS "-I./include -I./include/headers -I/usr/include/tensorflow ${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -fPIC")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g --w")
ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
TARGET_LINK_LIBRARIES(${fw_name} ${EXTRA_LDFLAGS})
+TARGET_LINK_LIBRARIES(${fw_name} -Wl,--no-as-needed tensorflowlite tensorflowlite_flex)
SET_TARGET_PROPERTIES(${fw_name}
BuildRequires: pkgconfig(inference-engine-interface-common)
BuildRequires: coregl-devel
BuildRequires: flatbuffers-devel
-BuildRequires: tensorflow2-lite-devel
%description
Tensorflow-Lite based implementation of inference-engine-interface
LOGI("Inferece targets are: [%d]", mTargetTypes);
- if (mTargetTypes == INFERENCE_TARGET_GPU) {
- TfLiteGpuDelegateOptionsV2 options = TfLiteGpuDelegateOptionsV2Default();
- TfLiteDelegate *delegate = TfLiteGpuDelegateV2Create(&options);
- if (!delegate){
- LOGE("Failed to GPU delegate");
- return INFERENCE_ENGINE_ERROR_INVALID_OPERATION;
- }
-
- if (mInterpreter->ModifyGraphWithDelegate(delegate) != kTfLiteOk)
- {
- LOGE("Failed to construct GPU delegate");
- return INFERENCE_ENGINE_ERROR_INVALID_OPERATION;
- }
- }
-
mInterpreter->SetNumThreads(MV_INFERENCE_TFLITE_MAX_THREAD_NUM);
+
LOGI("mInterpreter->tensors_size() :[%zu]",
mInterpreter->tensors_size());
#include <inference_engine_common.h>
-#include "tensorflow2/lite/delegates/gpu/delegate.h"
-#include "tensorflow2/lite/kernels/register.h"
-#include "tensorflow2/lite/model.h"
-#include "tensorflow2/lite/optional_debug_tools.h"
+#include "tensorflow/lite/kernels/register.h"
+#include "tensorflow/lite/model.h"
+#include "tensorflow/lite/optional_debug_tools.h"
#include <memory>
#include <dlog.h>