* Infrastructure for tflite * Removed submodule flatbuffers * Added flatbuffers submodule. Fixed version to v22.12.06 aka acf39ff * Move headers back * Flatbuffers integration * Small fixes * Started parsing the Model * flatbuffer changes * decoder_flatbuffer changes * Lite Input Model -- not needed as of now but looks cool * Rolled back inherritance from ov::frontend::tensorflow::InputModel * Results are not treated as outputs, but its ok * Fix missplaced input vs output * Refactor * Load model op-by-op. Frontend API finalized * Debugging still, there are prints here and there. Decoder is not sane * Convolution with all attributes is translated and quantization is applied for inputs and constatants. TODO: quantize intermediate tensors, separate decoder specific logic? * Float ssd and posenet models are showing good accuracy * Need to refactor but work flawlessly * Telemetry and lightweight model cutting * Code style and test changes. Extensions supported * Quantization and style * Style refinements * Move onednn back * New portion of operations enabled * TFLite FE doesn't inherrit TF FE * Moved files to another directory * Rename header op_table.hpp to common_op_table.hpp for all files in src/frontends/tensorflow_common/src/op/ * Removed visability macroses * CMake changes * Unit-test execution in .ci * Update labeler.yml * Codeowners * Style check and fix * Static Build arrangement * Addressing the comments * install common headers to previous place * New approach with public decoder and graph_iterator * New approach with public decoder and graph_iterator * Move GraphIterator back * Comments addressed * Comments adressed * Preliminary TF FE README.md changes * Added target_compile_definitions OPENVINO_STATIC_LIBRARY for static build * Fixed conflicts and added TF to common places * Frontends use only openvino::core::dev API * Merged common tensorflow changes and made code build and work on selective number of models * Style * Rollback unnecessary changes from Tensorflow FE * Rollback unnecessary changes from Tensorflow Common * Minor refactor * cmake minor refactoring * Mixed commit * Style and merge fix * Low hanging fruit operations * Fix windows build * Refactor quantization parameters representation * license compliance. approved by OS PDT * copyrights in generic file * dependabot * labeler * Unit Test to be triggered in CI * cmake variables naming. corrected copyright years in copyrights/generic file * library renamed in .ci/ calls * Copyright year update * Set openvino-tf-frontend-maintainers as owner of /src/frontends/tensorflow_lite/ * Fixed flatc corss-compilation * Cleaned flatbuffers header usage * Nitpicks solved * Update cmake/templates/OpenVINOConfig.cmake.in * Compile with flatbuffers headers * Fixed "which is prefixed in the source directory" * Fixed typo in flatbuffers cmake * Removed flatbuffers submodule * Added fork submodule * Fixed static build * Fixed cross-compilatio * Fixed -Wshadow warning * Fixed warning on Windows * Use only headers from flatbuffers library * Added LTO and fixed compilation errors on Windows * Fixed warnings in tensorflow_common * Move ctors implementation to cpp file * Added information about new frontends to common FEm part * Temporaryily disable warnings * Fixed code style using clang-format * Fixed Windows * reverted changes in onnx * Revert changes in onnx_common * Removed pragma once frm cpp Co-authored-by: missjane <estepyreva@gmail.com> Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
62 lines
2.4 KiB
CMake
62 lines
2.4 KiB
CMake
# Copyright (C) 2018-2023 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
|
set(FLATBUFFERS_BUILD_FLATLIB OFF CACHE BOOL "" FORCE)
|
|
set(FLATBUFFERS_BUILD_FLATHASH OFF CACHE BOOL "" FORCE)
|
|
set(FLATBUFFERS_INSTALL OFF CACHE BOOL "" FORCE)
|
|
set(FLATBUFFERS_CPP_STD ${CMAKE_CXX_STANDARD})
|
|
|
|
# note: HOST_AARCH64 AND X86_64 are not handled for Apple explicitly, becuase it can work via Rosetta
|
|
if(CMAKE_CROSSCOMPILING OR (APPLE AND (HOST_X86_64 AND AARCH64)) )
|
|
set(FLATBUFFERS_BUILD_FLATC OFF CACHE BOOL "" FORCE)
|
|
else()
|
|
set(FLATBUFFERS_BUILD_FLATC ON CACHE BOOL "" FORCE)
|
|
endif()
|
|
|
|
# build flatc when we don't use cross-compilation
|
|
|
|
add_subdirectory(flatbuffers EXCLUDE_FROM_ALL)
|
|
|
|
# build flatc using cross-compilation
|
|
|
|
if(FLATBUFFERS_BUILD_FLATC)
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
set_target_properties(flatc PROPERTIES COMPILE_OPTIONS "-Wno-shadow")
|
|
endif()
|
|
|
|
set(flatbuffers_COMPILER $<TARGET_FILE:flatc> PARENT_SCOPE)
|
|
set(flatbuffers_DEPENDENCY flatc PARENT_SCOPE)
|
|
else()
|
|
set(HOST_FLATC_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/install")
|
|
|
|
ov_native_compile_external_project(
|
|
TARGET_NAME host_flatc
|
|
NATIVE_INSTALL_DIR "${HOST_FLATC_INSTALL_DIR}"
|
|
CMAKE_ARGS "-DFLATBUFFERS_BUILD_TESTS=${FLATBUFFERS_BUILD_TESTS}"
|
|
"-DFLATBUFFERS_BUILD_FLATLIB=${FLATBUFFERS_BUILD_FLATLIB}"
|
|
"-DFLATBUFFERS_CPP_STD=${FLATBUFFERS_CPP_STD}"
|
|
"-DFLATBUFFERS_BUILD_FLATHASH=${FLATBUFFERS_BUILD_FLATHASH}"
|
|
NATIVE_SOURCE_SUBDIR "flatbuffers"
|
|
NATIVE_TARGETS flatc)
|
|
|
|
set(flatbuffers_COMPILER "${HOST_FLATC_INSTALL_DIR}/bin/flatc")
|
|
add_executable(flatbuffers::flatc IMPORTED GLOBAL)
|
|
set_property(TARGET flatbuffers::flatc APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
set_target_properties(flatbuffers::flatc PROPERTIES
|
|
IMPORTED_LOCATION_RELEASE "${flatbuffers_COMPILER}")
|
|
set_target_properties(flatbuffers::flatc PROPERTIES
|
|
MAP_IMPORTED_CONFIG_DEBUG Release
|
|
MAP_IMPORTED_CONFIG_MINSIZEREL Release
|
|
MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release)
|
|
add_dependencies(flatbuffers::flatc host_flatc)
|
|
|
|
set(flatbuffers_DEPENDENCY host_flatc PARENT_SCOPE)
|
|
set(flatbuffers_COMPILER "${flatbuffers_COMPILER}" PARENT_SCOPE)
|
|
endif()
|
|
|
|
# set parent scope
|
|
|
|
set(flatbuffers_LIBRARY FlatBuffers PARENT_SCOPE)
|