openvino/cmake/features.cmake

187 lines
7.7 KiB
CMake
Raw Normal View History

# Copyright (C) 2018-2023 Intel Corporation
2020-02-11 13:48:49 -06:00
# SPDX-License-Identifier: Apache-2.0
#
#
# Common cmake options
#
ie_dependent_option (ENABLE_INTEL_CPU "CPU plugin for OpenVINO Runtime" ON "RISCV64 OR X86 OR X86_64" OFF)
2020-02-11 13:48:49 -06:00
ie_option (ENABLE_TESTS "unit, behavior and functional tests" OFF)
2020-04-13 13:17:23 -05:00
ie_option (ENABLE_COMPILE_TOOL "Enables compile_tool" ON)
ie_option (ENABLE_STRICT_DEPENDENCIES "Skip configuring \"convinient\" dependencies for efficient parallel builds" ON)
if(X86_64)
set(ENABLE_INTEL_GPU_DEFAULT ON)
else()
set(ENABLE_INTEL_GPU_DEFAULT OFF)
endif()
ie_dependent_option (ENABLE_INTEL_GPU "GPU OpenCL-based plugin for OpenVINO Runtime" ${ENABLE_INTEL_GPU_DEFAULT} "X86_64 OR AARCH64;NOT APPLE;NOT MINGW;NOT WINDOWS_STORE;NOT WINDOWS_PHONE" OFF)
if (ANDROID OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0))
# oneDNN doesn't support old compilers and android builds for now, so we'll
# build GPU plugin without oneDNN
set(ENABLE_ONEDNN_FOR_GPU_DEFAULT OFF)
else()
set(ENABLE_ONEDNN_FOR_GPU_DEFAULT ON)
endif()
ie_dependent_option (ENABLE_ONEDNN_FOR_GPU "Enable oneDNN with GPU support" ${ENABLE_ONEDNN_FOR_GPU_DEFAULT} "ENABLE_INTEL_GPU" OFF)
ie_option (ENABLE_PROFILING_ITT "Build with ITT tracing. Optionally configure pre-built ittnotify library though INTEL_VTUNE_DIR variable." OFF)
ie_option_enum(ENABLE_PROFILING_FILTER "Enable or disable ITT counter groups.\
Supported values:\
ALL - enable all ITT counters (default value)\
FIRST_INFERENCE - enable only first inference time counters" ALL
ALLOWED_VALUES ALL FIRST_INFERENCE)
ie_option (ENABLE_PROFILING_FIRST_INFERENCE "Build with ITT tracing of first inference time." ON)
ie_option_enum(SELECTIVE_BUILD "Enable OpenVINO conditional compilation or statistics collection. \
In case SELECTIVE_BUILD is enabled, the SELECTIVE_BUILD_STAT variable should contain the path to the collected InelSEAPI statistics. \
Usage: -DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=/path/*.csv" OFF
ALLOWED_VALUES ON OFF COLLECT)
ie_option (ENABLE_DOCS "Build docs using Doxygen" OFF)
find_package(PkgConfig QUIET)
ie_dependent_option (ENABLE_PKGCONFIG_GEN "Enable openvino.pc pkg-config file generation" ON "LINUX OR APPLE;PkgConfig_FOUND;BUILD_SHARED_LIBS" OFF)
#
2022-12-01 07:39:48 -06:00
# OpenVINO Runtime specific options
#
# "OneDNN library based on OMP or TBB or Sequential implementation: TBB|OMP|SEQ"
set(THREADING "TBB" CACHE STRING "Threading")
set_property(CACHE THREADING PROPERTY STRINGS "TBB" "TBB_AUTO" "OMP" "SEQ")
list (APPEND IE_OPTIONS THREADING)
if (NOT THREADING STREQUAL "TBB" AND
NOT THREADING STREQUAL "TBB_AUTO" AND
NOT THREADING STREQUAL "OMP" AND
NOT THREADING STREQUAL "SEQ")
message(FATAL_ERROR "THREADING should be set to TBB (default), TBB_AUTO, OMP or SEQ")
endif()
if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND
(BUILD_SHARED_LIBS OR (LINUX AND X86_64)))
set(ENABLE_TBBBIND_2_5_DEFAULT ON)
else()
set(ENABLE_TBBBIND_2_5_DEFAULT OFF)
endif()
ie_dependent_option (ENABLE_TBBBIND_2_5 "Enable TBBBind_2_5 static usage in OpenVINO runtime" ${ENABLE_TBBBIND_2_5_DEFAULT} "THREADING MATCHES TBB" OFF)
2022-12-01 07:39:48 -06:00
ie_dependent_option (ENABLE_INTEL_GNA "GNA support for OpenVINO Runtime" ON
"NOT APPLE;NOT ANDROID;X86_64;CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 5.4" OFF)
ie_option (ENABLE_INTEL_GNA_DEBUG "GNA debug build" OFF)
ie_dependent_option (ENABLE_IR_V7_READER "Enables IR v7 reader" ${BUILD_SHARED_LIBS} "ENABLE_TESTS;ENABLE_INTEL_GNA" OFF)
Static compilation for inference plugins (#8197) * 1. Removed explicit SHARED from libraries 2. Fixed double definition for ie_layer_validators * Fixed SEG in unit-test: order of initialization for global vars * Added an ability to find plugins.xml from static IE * Fixes in unit-test * Migrated to new macro for import / export * Minimized number of custom dllexport * Don't use IR v7 for static libraries * Revert for merge * Don't enable tests with dlopen for static libraries * Code style * Added condition for export * Revert format_reader * Removed forward decalaration with external linkage * Fixed IE linkage on Windows * Reverted back 2 flags * Minimal RRTI for cpuFuncTests * Minimal RRTI for cpuFuncTests * Still need IR v7 reader * Fixed build * Fixed compilation * clang-format fix * Removed BUILD_AS_IS and used USE_STATIC_IE * Enable IR v7 reader as static library * Fixed compilation for GPU plugin * Trying to build plugins as static library * Plugins are able provide their own name for CreatePluginEngine function * Fixed CPU * Fixed comments * Fixed ENABLE_IR_V7_READER usage * Fixed VPU * clang-format * Fixes * Fix * Load multiple plugins at once * Fixed interpreter undefined symbols * Trying to dynamically register static plugins * Reverted some ngraph changes * Fixed cpuUnitTests compilation * Fixed compilation * Fixed myriad * Fixed custom_opset tests * Reverted linker flags * Support both static and dynamic plugins * Fixed compilation of myriadFuncTests * Removed duplication * Fixes after self-review * Fixed linkage for preprocessing * Fixes for Windows * Fixes * Fixed cmake options * Fix * Fix * Fix 2
2021-10-28 03:33:56 -05:00
ie_option (ENABLE_GAPI_PREPROCESSING "Enables G-API preprocessing" ON)
ie_option (ENABLE_MULTI "Enables MULTI Device Plugin" ON)
ie_option (ENABLE_AUTO "Enables AUTO Device Plugin" ON)
Static compilation for inference plugins (#8197) * 1. Removed explicit SHARED from libraries 2. Fixed double definition for ie_layer_validators * Fixed SEG in unit-test: order of initialization for global vars * Added an ability to find plugins.xml from static IE * Fixes in unit-test * Migrated to new macro for import / export * Minimized number of custom dllexport * Don't use IR v7 for static libraries * Revert for merge * Don't enable tests with dlopen for static libraries * Code style * Added condition for export * Revert format_reader * Removed forward decalaration with external linkage * Fixed IE linkage on Windows * Reverted back 2 flags * Minimal RRTI for cpuFuncTests * Minimal RRTI for cpuFuncTests * Still need IR v7 reader * Fixed build * Fixed compilation * clang-format fix * Removed BUILD_AS_IS and used USE_STATIC_IE * Enable IR v7 reader as static library * Fixed compilation for GPU plugin * Trying to build plugins as static library * Plugins are able provide their own name for CreatePluginEngine function * Fixed CPU * Fixed comments * Fixed ENABLE_IR_V7_READER usage * Fixed VPU * clang-format * Fixes * Fix * Load multiple plugins at once * Fixed interpreter undefined symbols * Trying to dynamically register static plugins * Reverted some ngraph changes * Fixed cpuUnitTests compilation * Fixed compilation * Fixed myriad * Fixed custom_opset tests * Reverted linker flags * Support both static and dynamic plugins * Fixed compilation of myriadFuncTests * Removed duplication * Fixes after self-review * Fixed linkage for preprocessing * Fixes for Windows * Fixes * Fixed cmake options * Fix * Fix * Fix 2
2021-10-28 03:33:56 -05:00
Auto Batching impl (#7883) * auto-batching POC squashed (all commits from auto-batch-2021.3 branch) (cherry picked from commit d7742f2c747bc514a126cc9a4d5b99f0ff5cbbc7) * applying/accomodating the API changes after rebase to the master * replaying modified version of actual batch selection * eearly experiments with model mem footprint * changes from rebasing to the latest master * experimenting with DG1 on the batch size selection, also collecting the mem footprint * WIP:moving the auto-batching to the icore to let the MULT/AUTO support that, ALLOW_AUTO_BATCHING as a conventional config key. still fials hot device swap * quick-n-dirty batch footpint vs device total mem * code style * testing which models perform badly due to kernels and NOT (batched) footprint * stub pipeline task to comunicate the readiness rather than promise/future * quick-n-dirty timeout impl * explicit _completionTasks,reverting BA to use the timeout * inputs outputs copies, works with AUTO and demo now * accomodate the config per device-id, after rebase to the latest master * allowing the auto-batching only with tput hint to let more conventional tests pass * fix the pre-mature timeout restaring via waiting for batch1 requests completion * moved the bacthed request statring ( along with input copies) to the dedicated thread * [IE CLDNN] Disable bs_fs_yx_bsv16_fsv16 format for int8 convolution * code style * increasing the timeout to test the ssd_* models perf (timeout?) issues * reducing number of output stuff in BA to avoid bloating the logs in experiments * more aggressive batching for experiments, not limited to 32 and also 4 as a min * more accurate timeout debugging info * getting the reqs limitation from the plugin SetConfig as well * refactor the reshape logic a bit to accomodate CPU for bathcing, also added remeote context * let the benchamrk_app to consume specific batch values for the auto-batching such as BATCH:GPU(4) * auto-batching functional test (with results check vs ref) and GPU instance for that * fixed arithemtic on blobs ptrs * clang * handling possible batched network failure * BATCH as the constants device name in test * ENABLE_BATCH * func tests for CPU, also DetectionOutput hetero tests (CPU and GPU) * DetectionOutput hetero test for the CPU * reenabling the Auto-Batching in the AUTO * auto-batching device enabled in the test * fixed the DO test * improve the loading loop logic * brushed the config keys * allow hetero code-path for explicit device name like BATCH:GPU(4), used in the hetero code-path tests * fix the test after refactoring * clang * moving ThreadSafeQueue to the ie_parallel, as it is re-used in the AUTO/MULTI and BATCH now * auto-batching hetero test (subgraph with DetectionOutput) * fixed minor changes that were result of experiments with impl * code-style * brushing, disabling CPU's HETERO tests until planned activity for 22.2 * removing home-baked MAX_BATCH_SZIE and swicthing to the official impl by GPU team * remote blobs tests for the auto-batching (old API) * brushed names a bit * CreateContext and LoadNEtwork with context for the Auto-Batching plus remote-blobs tests * fixed the ieUnitTests with adding CreateContext stub to the MockICore * clang * improved remote-blobs tests * revert the back BA from exeprimenents with AB + device_use_mem * conformance tests for BATCH, alos batch size 1 is default for BATCH:DEVICE * remote blobs 2.0 tests, issue with context having the orig device name * debugging DG1 perf drop (presumably due to non-fitting the device-mem) * disbaling WA with batch/=2 for excesive mem footptint, leaving only streams 2 * remote blobs 2.0 tests for different tensor sharing types * converting assert to throw to accomodate legacy API where the lock() was possible to be called * revert the timeout back to avoid mixing the studies, fixed the footprint calc * reverting to estimating the max batch by extrapolating from bacth1 size * more conservative footptint etimation (with bacth1), graceful bacth 1 handling without duplication * even graceful batch 1 handling without duplication * WA for MAX_BATCH_SIZE failure, removing batch4 as a min for the auto-batching * AutoBatchPlugin -> ov_auto_batch_plugin * WA for gcc 4.8 * clang * fix misprint * fixed errors resulted from recent OV's Variant to Any transition * skip auto-batching for already-batched networks * AUTO_BATCH_TIMEOUT and tests * GPU-specific L3 * switched to pure config, also improved ALLOW_AUTO_BATCHING config key handling logic * debugging device info * enabling the config tests for the GPU and fixing the Auto-batching tests to pass * making the default (when not recognized the driver) cache size more aggressive, to accomodate recent HW with old drivers * skip auto-batching for RNNs and alikes (e.g. single CHW input) * fixed fallback to the bacth1 and moved HETERO path under condition to avoid bloating * brushing * Auto plugin GetMetric support gpu auto-batch Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com> * add test case Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com> * add comments on test Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com> * brushing the vars names, alos adding the excpetion handling * disabling the auto-batching for the networks with non-batched outputs and faster-rcnn and alikes (CVS-74085) to minimize the of #failures * add try catch Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com> * brushing the code changed in the GPU plugin * Auto-Batch requests tests * brushed varibles a bit (ref) * cleaned debug output from the ie_core * cleaned cmake for the Auto-Batch * removed batchN estimation from batch1 * cleaned from debug printf * comments, cleanup * WA the mock test errors introduced with merging the https://github.com/myshevts/openvino/pull/13 * Adding back removed batchN estimation from batch1 to debug degradations on DG1 (resulted from too optimistic MAX_BATCH_SIZE?). This partially reverts commit e8f1738ac19d20dd56f36d4e824bf273fd6ea917. * brushing ie_core.cpp * fix 32bit compilation * Code review: ENABLE_AUTO_BATCH * consolidate the auot-batching logic in ie_core.cpp into single ApplyAutoBAtching * renamed brushed the OPTIMAL_BATCH (now with_SIZE) and mimicks the MAX_BATCH_SZIE wrt MODEL_PTR * default value for the OPTIMAL_BATCH_SIZE * clang * accomodate new func tests location * fix shuffle of headers after clang + copyrights * fixed misprint made during code refactoring * moving the common therad-safe containers (like ThreadSafeQueue) to the dedicated dev_api header * switch from the device name to the OPTIMAL_BATCH_SIZE metric presence as a conditin to consider Auto-Batching * switching from the unsafe size() and minimizing time under lock * code style * brushed the ApplyAutoBatching * brushed the netric/config names and descriptions * completed the core intergration tests for the auto-batching * ExecGraphInfo and check for incorrect cfg * removed explicit dependencies from cmake file of the plugin * disabling Auto-Batching thru the tput hint (to preserve current product default), only excplicit like BATCH:GPU used in the tests Co-authored-by: Roman Lyamin <roman.lyamin@intel.com> Co-authored-by: Hu, Yuan2 <yuan2.hu@intel.com>
2021-12-24 03:55:22 -06:00
ie_option (ENABLE_AUTO_BATCH "Enables Auto-Batching Plugin" ON)
Static compilation for inference plugins (#8197) * 1. Removed explicit SHARED from libraries 2. Fixed double definition for ie_layer_validators * Fixed SEG in unit-test: order of initialization for global vars * Added an ability to find plugins.xml from static IE * Fixes in unit-test * Migrated to new macro for import / export * Minimized number of custom dllexport * Don't use IR v7 for static libraries * Revert for merge * Don't enable tests with dlopen for static libraries * Code style * Added condition for export * Revert format_reader * Removed forward decalaration with external linkage * Fixed IE linkage on Windows * Reverted back 2 flags * Minimal RRTI for cpuFuncTests * Minimal RRTI for cpuFuncTests * Still need IR v7 reader * Fixed build * Fixed compilation * clang-format fix * Removed BUILD_AS_IS and used USE_STATIC_IE * Enable IR v7 reader as static library * Fixed compilation for GPU plugin * Trying to build plugins as static library * Plugins are able provide their own name for CreatePluginEngine function * Fixed CPU * Fixed comments * Fixed ENABLE_IR_V7_READER usage * Fixed VPU * clang-format * Fixes * Fix * Load multiple plugins at once * Fixed interpreter undefined symbols * Trying to dynamically register static plugins * Reverted some ngraph changes * Fixed cpuUnitTests compilation * Fixed compilation * Fixed myriad * Fixed custom_opset tests * Reverted linker flags * Support both static and dynamic plugins * Fixed compilation of myriadFuncTests * Removed duplication * Fixes after self-review * Fixed linkage for preprocessing * Fixes for Windows * Fixes * Fixed cmake options * Fix * Fix * Fix 2
2021-10-28 03:33:56 -05:00
ie_option (ENABLE_HETERO "Enables Hetero Device Plugin" ON)
ie_option (ENABLE_TEMPLATE "Enable template plugin" ON)
ie_dependent_option (ENABLE_PLUGINS_XML "Generate plugins.xml configuration file or not" OFF "NOT BUILD_SHARED_LIBS" OFF)
ie_dependent_option (GAPI_TEST_PERF "if GAPI unit tests should examine performance" OFF "ENABLE_TESTS;ENABLE_GAPI_PREPROCESSING" OFF)
ie_dependent_option (ENABLE_DATA "fetch models from testdata repo" ON "ENABLE_FUNCTIONAL_TESTS;NOT ANDROID" OFF)
2022-12-01 07:39:48 -06:00
ie_dependent_option (ENABLE_BEH_TESTS "tests oriented to check OpenVINO Runtime API correctness" ON "ENABLE_TESTS" OFF)
ie_dependent_option (ENABLE_FUNCTIONAL_TESTS "functional tests" ON "ENABLE_TESTS" OFF)
2022-12-01 07:39:48 -06:00
ie_option (ENABLE_SAMPLES "console samples are part of OpenVINO Runtime package" ON)
ie_option (ENABLE_OPENCV "enables custom OpenCV download" OFF)
ie_option (ENABLE_V7_SERIALIZE "enables serialization to IR v7" OFF)
set(OPENVINO_EXTRA_MODULES "" CACHE STRING "Extra paths for extra modules to include into OpenVINO build")
2022-12-01 07:39:48 -06:00
ie_dependent_option(ENABLE_TBB_RELEASE_ONLY "Only Release TBB libraries are linked to the OpenVINO Runtime binaries" ON "THREADING MATCHES TBB;LINUX" OFF)
if(CMAKE_HOST_LINUX AND LINUX)
# Debian packages are enabled on Ubuntu systems
# so, system TBB / pugixml / OpenCL can be tried for usage
set(ENABLE_SYSTEM_LIBS_DEFAULT ON)
else()
set(ENABLE_SYSTEM_LIBS_DEFAULT OFF)
endif()
# try to search TBB from brew by default
if(APPLE AND AARCH64)
set(ENABLE_SYSTEM_TBB_DEFAULT ON)
else()
set(ENABLE_SYSTEM_TBB_DEFAULT ${ENABLE_SYSTEM_LIBS_DEFAULT})
endif()
# users wants to use his own TBB version, specific either via env vars or cmake options
if(DEFINED ENV{TBBROOT} OR DEFINED ENV{TBB_DIR} OR DEFINED TBB_DIR OR DEFINED TBBROOT)
set(ENABLE_SYSTEM_TBB_DEFAULT OFF)
endif()
# for static libraries case libpugixml.a must be compiled with -fPIC
ie_dependent_option (ENABLE_SYSTEM_PUGIXML "use the system copy of pugixml" ${ENABLE_SYSTEM_LIBS_DEFAULT} "BUILD_SHARED_LIBS" OFF)
ie_dependent_option (ENABLE_SYSTEM_TBB "use the system version of TBB" ${ENABLE_SYSTEM_TBB_DEFAULT} "THREADING MATCHES TBB" OFF)
ie_dependent_option (ENABLE_SYSTEM_OPENCL "Use the system version of OpenCL" ${ENABLE_SYSTEM_LIBS_DEFAULT} "BUILD_SHARED_LIBS;ENABLE_INTEL_GPU" OFF)
ie_option (ENABLE_DEBUG_CAPS "enable OpenVINO debug capabilities at runtime" OFF)
ie_dependent_option (ENABLE_GPU_DEBUG_CAPS "enable GPU debug capabilities at runtime" ON "ENABLE_DEBUG_CAPS" OFF)
ie_dependent_option (ENABLE_CPU_DEBUG_CAPS "enable CPU debug capabilities at runtime" ON "ENABLE_DEBUG_CAPS" OFF)
find_host_package(PythonInterp 3 QUIET)
ie_option(ENABLE_OV_ONNX_FRONTEND "Enable ONNX FrontEnd" ${PYTHONINTERP_FOUND})
ie_option(ENABLE_OV_PADDLE_FRONTEND "Enable PaddlePaddle FrontEnd" ON)
Tensorflow Lite frontend (#14977) * 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>
2023-01-26 20:27:59 -06:00
ie_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON)
Add PyTorch Frontend (#15069) * WIP * update input validation * upsample_nearest2d and upsample_bilinear2d support * support leaky_relu add test for inplace relu * update tests, add handler for ListConstruct * Do not create extra outputs in main body * add positive case with non-default value * update testing * update test, handle non constant size and scale * remove ie_device * add aten::group_norm support * refactoring * Enable aten::reshape_as operator and add layer test * more tests * Fix typo in test * Resolve conflicts * fix code style * expand init version * expand_as and tests * add transposed convolutions support * add tests * initial support pad * add circular * update for differenced in rang * cleanup * refactor * more tests * apply review comments * Add split+listunpack transformation * Add split+getitem transformation * Add test cases * fix typo * Minor fixes * Apply suggestions from code review Co-authored-by: Maxim Vafin <maxim.vafin@intel.com> * Apply suggestions from code review * Small fix * Support converting models without freezing * support BoolTensor and masked_fill * add support aten::rsqrt and test for sqrt * add cumsum and type_as * support clamp * support more matrix operations * add tests * Add aten::adaptive_avg_pool3d and layer test * Change to rank * fix code style in utils.hpp * Update src/frontends/pytorch/src/op_table.cpp Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com> * fix code style * add tests * add xfail * remove unnecessary broadcast * Changes required by style formater * aten::_convolution_mode * Changes requested by a reviewer * remove code duplication * add aten::unbind transformation * full, zeros and ones * Support getattr list and unrolling nested ifs * Remove line change * Enable back freezing in layer tests * Add aten::norm operator and layer test * Small fix in layer test * add aten::roll * add empty line * Typo fix * fix style * fix style v2 * add pytorch frontend to wheel * Support all types of numeric norms * add check for dynamic shapes * remove random change * merge statements * add min and max ops support * aten::max and aten::min * move axes range creation to utils * add transformation for tuple results, update tests * fix copyright * aten::var * add test and translation for numel * ignore aten::clone * Add layer test for aten::add operator * Fix typo * Remove redundant import * Add parameter name in forward method * fix code style * apply review comments * Add size+slice+listunpack transform * Add append listunpack transformation * Register transformation * aten::where * update realization * Fix issue with getitem * Fix getitem * Add layer test for aten::view operator * Add tests for listunpack * add test for aten::div * fix style * update aten::adaptive_max_pool2d * fix style * add aten::floor_divide * aten::addmm support alpha and beta with different dtype * nonzero * Change test name * update test cases to include other dtypes * aten::arange * prim::max transformation for ListConstruct * rename op * generalize conv2d implementation for conv1d and conv3d * aten::unsqueeze_ and tests for aten::unsqueeze (#70) * add aten::le, aten::ge and tests for other tensor comparision ops (#74) * add support trigonometry ops (#73) * support aten::upsample_bicubic2d, aten::ceil, aten::floor (#72) Co-authored-by: Maxim Vafin <maxim.vafin@intel.com> * extend and add tests for avg_pool and max_pool * extend tests and constant filling ops * fix as_tensor and full ops * aten::repeat * fix code style * aten::im2col (#61) * aten::im2col * remove debug prints, add number of elements check * fix failed tests * move helper function * use split * Update src/frontends/pytorch/src/op/im2col.cpp Co-authored-by: Maxim Vafin <maxim.vafin@intel.com> * fix code style Co-authored-by: Maxim Vafin <maxim.vafin@intel.com> * Update src/frontends/pytorch/src/utils.cpp Co-authored-by: Maxim Vafin <maxim.vafin@intel.com> * fix code style * revert removeinf floordiv, add floor_divide file * Fix merge issue * reduce code duplication * refactor * Add len operator with layer test * update clamp to support mixed precision and add support torch.long for constants * aten::selu * add trunc mode to div * add else statement * Add test case to layer test * Fix submodules (#88) * update test file * fix namings * execute in fp64 and convert back to initial precision * Revert set_output_size to master. Small fix in If validate * Fix build and code style * fix failed tests * Add torchvision::nms operator and layer test * Change requested by a reviewer * Remove div test * convert constants to input type * Mark some cases in div tests as xfail (#93) * Small refactoring (#94) * Small refactoring * Fix type * Fix python codestyle * Incremental fix code style (#95) * Fix style (#96) * Fix copyright * Fix code style * Branch clean up (#97) * Optimize includes and force opset10 (#98) * Optimize includes * Force opset10 in pt fe * Fix codestyle (#99) * Fix style * Fix clang codestyle * Fix cerr with debug log * Update src/bindings/python/src/pyopenvino/frontend/pytorch/decoder.cpp * Add pytorch dependency only if pytorch frontend is enabled * Update src/bindings/python/src/pyopenvino/CMakeLists.txt * Add layer tests to precommit (#100) * Add layer tests to precommit * Remove accidentally added files * Apply code style on layer tests * batch norm tests and fixes * move default weight and bias to else block * reduce code duplication * Changes requested by a reviewer * Changes requested by a reviewer * Remove dependency from pytorch in pyopenvino (#102) * Remove dependency from pytorch when fe is disabled * Change docstring * Remove pytorch FE dependency from pyopenvino * Apply codestyle (#107) * Apply codestyle * Remove commented line * Apply suggestions from code review Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com> * Fix mock FE test (#108) * Fix mock PE test (#111) * Revert changes in StridedSlice (#114) * Small refactoring (#116) * Small refactoring * Fix codestyle * Apply suggestions from code review Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com> * Apply suggestions from code review * Update src/frontends/pytorch/src/op/group_norm.cpp * Fix cmake copyright define (#117) * Update src/frontends/pytorch/src/op/arange.cpp * Apply suggestions from code review * Update build configs (#120) * FIx build configs * Update type cast in full.cpp * Apply review feedback (#121) * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com> * Fix issue after master merge (#122) * Fix issue after master merge * Fix build Co-authored-by: eaidova <ekaterina.aidova@intel.com> Co-authored-by: bszmelcz <bartosz.szmelczynski@intel.com> Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com> Co-authored-by: sikorsl1 <leonard.sikorski@intel.com> Co-authored-by: Leonard Sikorski <l.sikorski123@gmail.com> Co-authored-by: Mateusz <mateusz.mikolajczyk@intel.com> Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-01-18 08:16:57 -06:00
ie_option(ENABLE_OV_PYTORCH_FRONTEND "Enable PyTorch FrontEnd" ON)
ie_option(ENABLE_OV_TF_FRONTEND "Enable TensorFlow FrontEnd" ON)
Tensorflow Lite frontend (#14977) * 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>
2023-01-26 20:27:59 -06:00
ie_option(ENABLE_OV_TF_LITE_FRONTEND "Enable TensorFlow Lite FrontEnd" ON)
ie_dependent_option(ENABLE_SYSTEM_PROTOBUF "Use system protobuf" OFF
"ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_TF_FRONTEND;BUILD_SHARED_LIBS" OFF)
[POC][TF FE] Support SavedModel format (with compression) (#16317) * Added Saved Model proto descriptors * Included Google's protobuf repository * Added wstring version of ov::util::directory_exists * Added initial implementation of Saved Model iterator # Conflicts: # src/frontends/tensorflow/src/frontend.cpp * Added missing proto files to repository * Implemented reading of variables index and data files # Conflicts: # src/frontends/tensorflow/src/frontend.cpp * Renamed class # Conflicts: # src/frontends/tensorflow/src/frontend.cpp * Fix for cross-platform directory_exists * Fixed codestyle and simplified code * CI fixes * Separeted Saved Model iterator from Proto iterator * Moved variables index into separate class * Added initial implementation of reading a variables from saved model # Conflicts: # src/frontends/tensorflow/src/frontend.cpp * Added external variable mapping * Code cleanup * Commit is for discussion purposes!!! Implemented RestoreV2 with a workaround for strings Not optimized, includes mem leak * In progress... * Added DT_STRING coverage into decoder_proto * m_variables_index moved into underlying class * Updated copyrgihts, added space between license and code * Moved string constant to separate class * Added AssignVariableOp operation * Changed behavior of RestoreV2 Updated stubs for other ops * Second working implementation, enabled: Program-only models Variables reading from data files * Extended docs * Fixed dynamic type * Fixed naming * Added Snappy submodule to support compression in TF FE * Enabled Snappy Compression for TF FE * Make static linkage of Snappy Changing Warning as error behavior for 3rd party * CI fixes * Added Snappy copyright info * Aligned behavior of StringConstant with UnsupportedConstant * Added correct naming and removing unused inputs/outputs
2023-03-24 06:07:16 -05:00
ie_dependent_option(ENABLE_SNAPPY_COMPRESSION "Enables compression support for TF FE" ON
"ENABLE_OV_TF_FRONTEND" ON)
ie_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON)
ie_dependent_option(ENABLE_SYSTEM_FLATBUFFERS "Use system flatbuffers" ON
"ENABLE_OV_TF_LITE_FRONTEND" OFF)
ie_dependent_option(ENABLE_OV_CORE_UNIT_TESTS "Enables OpenVINO core unit tests" ON "ENABLE_TESTS" OFF)
ie_option(ENABLE_OPENVINO_DEBUG "Enable output for OPENVINO_DEBUG statements" OFF)
2021-07-16 10:55:05 -05:00
if(NOT BUILD_SHARED_LIBS AND ENABLE_OV_TF_FRONTEND)
set(FORCE_FRONTENDS_USE_PROTOBUF ON)
else()
set(FORCE_FRONTENDS_USE_PROTOBUF OFF)
endif()
#
# Process featues
#
if(ENABLE_OPENVINO_DEBUG)
add_definitions(-DENABLE_OPENVINO_DEBUG)
endif()
if (ENABLE_PROFILING_RAW)
add_definitions(-DENABLE_PROFILING_RAW=1)
endif()
print_enabled_features()