Skip to content

Commit

Permalink
Moved legacy library and deprecated tests to GNA (openvinotoolkit#15244)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov authored Jan 25, 2023
1 parent a3fafda commit 0970bc8
Show file tree
Hide file tree
Showing 335 changed files with 414 additions and 364 deletions.
6 changes: 6 additions & 0 deletions .ci/azure/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,12 @@ jobs:
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_transformations_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Transformations.xml
displayName: 'Transformations Tests'

- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_legacy_transformations_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-LegacyTransformations.xml
displayName: 'Legacy Transformations Tests'

- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/commonUtilsTests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-CommonUtilTests.xml
displayName: 'Common Utils Tests'

- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineUnitTests.xml
displayName: 'IE UT old'

Expand Down
3 changes: 1 addition & 2 deletions .ci/azure/linux_debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,7 @@ jobs:
LD_LIBRARY_PATH: $(INSTALL_TEST_DIR)
displayName: 'Paddle Frontend UT'
- script: |
$(INSTALL_TEST_DIR)/ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml
- script: $(INSTALL_TEST_DIR)/ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml
env:
LD_LIBRARY_PATH: $(INSTALL_TEST_DIR)
displayName: 'TensorFlow Frontend Unit Tests'
Expand Down
6 changes: 6 additions & 0 deletions .ci/azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ jobs:

- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_transformations_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\Transformations.xml
displayName: 'Transformations Tests'

- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_legacy_transformations_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\LegacyTransformations.xml
displayName: 'Legacy Transformations Tests'

- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\commonUtilsTests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\CommonUtilTests.xml
displayName: 'Common Utils Tests'

- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\InferenceEngineUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-InferenceEngineUnitTests.xml
displayName: 'IE UT old'
Expand Down
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

# OpenVINO Func Tests:
/src/tests/ @openvinotoolkit/openvino-ie-tests-maintainers @openvinotoolkit/openvino-ie-test-developers
/src/tests_deprecated/ @openvinotoolkit/openvino-ie-tests-maintainers @openvinotoolkit/openvino-ie-test-developers
/src/frontends/tests/frontend/shared/ @openvinotoolkit/openvino-ie-tests-maintainers
/thirdparty/gtest/ @openvinotoolkit/openvino-ie-tests-maintainers

Expand All @@ -61,7 +60,6 @@

# OpenVINO GNA:
/src/plugins/intel_gna/ @openvinotoolkit/openvino-ie-gna-maintainers
/src/common/legacy/ @openvinotoolkit/openvino-ie-gna-maintainers

# OpenVINO Auto (MULTI) plugin:
/src/plugins/auto/ @openvinotoolkit/openvino-ie-auto-multi-maintainers
Expand Down
1 change: 0 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@

'category: GNA':
- 'src/plugins/intel_gna/**/*'
- 'src/common/legacy/**/*'

'category: GPU':
- 'src/plugins/intel_gpu/**/*'
Expand Down
7 changes: 1 addition & 6 deletions cmake/coverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,8 @@ ov_coverage_extract(INPUT "openvino" OUTPUT "low_precision_transformations"
ov_coverage_genhtml(INFO_FILE "low_precision_transformations"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")

ov_coverage_extract(INPUT "openvino" OUTPUT "legacy"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/common/legacy/*")
ov_coverage_genhtml(INFO_FILE "legacy"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")

ov_coverage_extract(INPUT "openvino" OUTPUT "preprocessing"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}src/common/preprocessing/*")
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}src/common/preprocessing/src/*")
ov_coverage_genhtml(INFO_FILE "preprocessing"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")

Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/IEDevScriptsConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ set(CMAKE_POLICY_DEFAULT_CMP0026 NEW)
set(CMAKE_POLICY_DEFAULT_CMP0042 NEW)
# CMake 3.9+: `RPATH` settings on macOS do not affect `install_name`.
set(CMAKE_POLICY_DEFAULT_CMP0068 NEW)
# CMake 3.12+: find_package() uses <PackageName>_ROOT variables.
set(CMAKE_POLICY_DEFAULT_CMP0074 NEW)
# CMake 3.13+: option() honors normal variables.
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
# CMake 3.19+: An imported target missing its location property fails during generation.
Expand Down
4 changes: 1 addition & 3 deletions cmake/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ ie_option (ENABLE_HETERO "Enables Hetero Device Plugin" ON)

ie_option (ENABLE_TEMPLATE "Enable template plugin" ON)

ie_dependent_option (ENABLE_GAPI_TESTS "tests for GAPI kernels" ON "ENABLE_GAPI_PREPROCESSING;ENABLE_TESTS" OFF)

ie_dependent_option (GAPI_TEST_PERF "if GAPI unit tests should examine performance" OFF "ENABLE_GAPI_TESTS" 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)

Expand Down
8 changes: 0 additions & 8 deletions docs/Doxyfile.config
Original file line number Diff line number Diff line change
Expand Up @@ -833,17 +833,9 @@ INPUT = "@MARKDOWN_INPUT@" \
"@OpenVINO_SOURCE_DIR@/src/frontends/common/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/conditional_compilation/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/itt/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/legacy/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/legacy/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/low_precision_transformations/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/low_precision_transformations/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/offline_transformations/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/preprocessing/" \
"@OpenVINO_SOURCE_DIR@/src/common/preprocessing/arm_neon/" \
"@OpenVINO_SOURCE_DIR@/src/common/preprocessing/cpu_x86_avx2/" \
"@OpenVINO_SOURCE_DIR@/src/common/preprocessing/cpu_x86_avx512/" \
"@OpenVINO_SOURCE_DIR@/src/common/preprocessing/cpu_x86_sse42/" \
"@OpenVINO_SOURCE_DIR@/src/common/snippets/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/transformations/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/util/include/" \
"@OpenVINO_SOURCE_DIR@/src/core/include/" \
Expand Down
1 change: 0 additions & 1 deletion docs/dev/test_coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ coverage/paddle_frontend/index.html
coverage/tf_frontend/index.html
coverage/openvino/index.html
coverage/onnx_frontend/index.html
coverage/legacy/index.html
coverage/ir_frontend/index.html
coverage/low_precision_transformations/index.html
coverage/template_plugin/index.html
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ target_include_directories(${TARGET_NAME} PRIVATE "${OpenVINO_SOURCE_DIR}/src/in
"${OpenVINO_SOURCE_DIR}/src/core/include"
"${OpenVINO_SOURCE_DIR}/src/bindings/c/include"
"${OpenVINO_SOURCE_DIR}/src/common/transformations/include"
"${OpenVINO_SOURCE_DIR}/src/common/preprocessing"
"${OpenVINO_SOURCE_DIR}/src/common/preprocessing/src"
"${OpenVINO_SOURCE_DIR}/src/common/util/include"
"${OpenVINO_SOURCE_DIR}/src/common/low_precision_transformations/include"
"${OpenVINO_SOURCE_DIR}/src/frontends/common/include"
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ add_subdirectory(common/preprocessing)
add_subdirectory(bindings)

if(ENABLE_TESTS)
add_subdirectory(tests_deprecated)
add_subdirectory(tests)
endif()
1 change: 0 additions & 1 deletion src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ frontends/ // OpenVINO frontends
inference/ // Provides API for model inference
plugins/ // OpenVINO plugins
tests/ // A backed of tests binaries for core and plugins
tests_deprecated/ // Deprecated tests
```

## OpenVINO Runtime library
Expand Down
6 changes: 6 additions & 0 deletions src/cmake/openvino.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ endif()

if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(${TARGET_NAME} PUBLIC OPENVINO_STATIC_LIBRARY)

# TODO: remove together we GNA plugin
# for static linkage the dependencies are in opposite order
if(TARGET inference_engine_ir_v7_reader)
target_link_libraries(${TARGET_NAME} PRIVATE inference_engine_ir_v7_reader)
endif()
endif()

if(WIN32)
Expand Down
1 change: 0 additions & 1 deletion src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ add_subdirectory(conditional_compilation)
add_subdirectory(util)

add_subdirectory(snippets)
add_subdirectory(legacy)
add_subdirectory(transformations)
add_subdirectory(offline_transformations)
add_subdirectory(low_precision_transformations)
221 changes: 3 additions & 218 deletions src/common/preprocessing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,223 +2,8 @@
# SPDX-License-Identifier: Apache-2.0
#

set (TARGET_NAME "openvino_gapi_preproc")
add_subdirectory(src)

file(GLOB LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
file(GLOB LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)

#
# Provides compilation flags for AVX512F, AVX512BW, AVX512DQ
# instructions support depending on an OS and a compiler
#
macro(ie_avx512_core_optimization_flags flags)
if(WIN32)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(${flags} /QxCORE-AVX512)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(${flags} /arch:AVX512)
else()
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
endif()
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(${flags} -xCORE-AVX512)
else()
set(${flags} -mavx512f -mavx512bw -mavx512dq -mfma)
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
list(APPEND ${flags} -Wno-error=maybe-uninitialized -Wno-maybe-uninitialized)
endif()
endif()
endif()
endmacro()

if(ENABLE_SSE42)
file(GLOB SSE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/cpu_x86_sse42/*.cpp)
file(GLOB SSE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/cpu_x86_sse42/*.hpp)

list(APPEND LIBRARY_HEADERS ${SSE_HEADERS})
list(APPEND LIBRARY_SRC ${SSE_SRC})

ie_sse42_optimization_flags(sse4_2_flags)
set_source_files_properties(${SSE_SRC} PROPERTIES COMPILE_OPTIONS "${sse4_2_flags}")
add_definitions(-DHAVE_SSE=1)
endif()

if(ENABLE_AVX2)
file(GLOB AVX2_SRC ${CMAKE_CURRENT_SOURCE_DIR}/cpu_x86_avx2/*.cpp)
file(GLOB AVX2_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/cpu_x86_avx2/*.hpp)

list(APPEND LIBRARY_HEADERS ${AVX2_HEADERS})
list(APPEND LIBRARY_SRC ${AVX2_SRC})

ie_avx2_optimization_flags(avx2_flags)
set_source_files_properties(${AVX2_SRC} PROPERTIES COMPILE_OPTIONS "${avx2_flags}")
add_definitions(-DHAVE_AVX2=1)
endif()


# Workaround for GCC version 5.4 and 5.5 bugs in Debug configuration.
if (CMAKE_COMPILER_IS_GNUCXX AND
(CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 5.5) AND
(CMAKE_BUILD_TYPE STREQUAL Debug))
set(GNU_5_DEBUG_CASE ON)
endif()

if(ENABLE_AVX512F AND NOT GNU_5_DEBUG_CASE)
file(GLOB AVX512_SRC ${CMAKE_CURRENT_SOURCE_DIR}/cpu_x86_avx512/*.cpp)
file(GLOB AVX512_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/cpu_x86_avx512/*.hpp)

list(APPEND LIBRARY_HEADERS ${AVX512_HEADERS})
list(APPEND LIBRARY_SRC ${AVX512_SRC})

ie_avx512_core_optimization_flags(avx512_flags)
set_source_files_properties(${AVX512_SRC} PROPERTIES COMPILE_OPTIONS "${avx512_flags}")
add_definitions(-DHAVE_AVX512=1)
endif()

if(ARM OR AARCH64)
ie_arm_neon_optimization_flags(neon_flags)

file(GLOB NEON_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/arm_neon/*.hpp)
file(GLOB NEON_SRC ${CMAKE_CURRENT_SOURCE_DIR}/arm_neon/*.cpp)

list(APPEND LIBRARY_HEADERS ${NEON_HEADERS})
list(APPEND LIBRARY_SRC ${NEON_SRC})

if(neon_flags)
set_source_files_properties(${NEON_SRC} PROPERTIES COMPILE_OPTIONS "${neon_flags}")
endif()

add_definitions(-DHAVE_NEON=1)
endif()

# Create object library

if(ENABLE_GAPI_PREPROCESSING)
add_library(${TARGET_NAME}_obj OBJECT
${LIBRARY_SRC}
${LIBRARY_HEADERS})
ie_faster_build(${TARGET_NAME}_obj UNITY)

target_compile_definitions(${TARGET_NAME}_obj PRIVATE
IMPLEMENT_INFERENCE_ENGINE_PLUGIN
$<TARGET_PROPERTY:openvino::runtime,INTERFACE_COMPILE_DEFINITIONS>
$<TARGET_PROPERTY:fluid,INTERFACE_COMPILE_DEFINITIONS>
ENABLE_GAPI_PREPROCESSING)

target_include_directories(${TARGET_NAME}_obj SYSTEM PRIVATE
$<TARGET_PROPERTY:ocv_hal,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:fluid,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:inference_engine_plugin_api,INTERFACE_INCLUDE_DIRECTORIES>)

target_include_directories(${TARGET_NAME}_obj PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}"
$<TARGET_PROPERTY:openvino::util,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:openvino::itt,INTERFACE_INCLUDE_DIRECTORIES>)

set_ie_threading_interface_for(${TARGET_NAME}_obj)

add_cpplint_target(${TARGET_NAME}_obj_cpplint FOR_TARGETS ${TARGET_NAME}_obj)

set(library_sources $<TARGET_OBJECTS:${TARGET_NAME}_obj>)
endif()

# Create module library file from object library

if(ENABLE_GAPI_PREPROCESSING)
if(BUILD_SHARED_LIBS)
set(library_type MODULE)
else()
set(library_type STATIC)
endif()
else()
set(library_type INTERFACE)
endif()

add_library(${TARGET_NAME} ${library_type} ${library_sources})

set_ie_threading_interface_for(${TARGET_NAME})

if(ENABLE_GAPI_PREPROCESSING)
target_compile_definitions(${TARGET_NAME} PUBLIC ENABLE_GAPI_PREPROCESSING)
target_link_libraries(${TARGET_NAME} PRIVATE fluid openvino::itt openvino::util)

if(BUILD_SHARED_LIBS)
target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime)
# make plugin to depend on preprocessing library
foreach(plugin IN LISTS PLUGIN_FILES)
string(REPLACE ":" ";" plugin "${plugin}")
list(REMOVE_AT plugin 0)
add_dependencies(${plugin} openvino_gapi_preproc)
endforeach()
add_dependencies(ov_plugins openvino_gapi_preproc)
else()
# for static linkage the dependencies are in opposite order
target_link_libraries(openvino PRIVATE ${TARGET_NAME})
endif()

# Workaround to avoid warnings caused with bug in the avx512intrin.h of GCC5
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND
(CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 5.5))
set_target_properties(${TARGET_NAME} PROPERTIES LINK_FLAGS_RELEASE "-Wno-error=maybe-uninitialized -Wno-maybe-uninitialized")
endif()

if(WIN32 AND NOT library_type STREQUAL "INTERFACE")
set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME})
endif()

ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})

ie_add_vs_version_file(NAME ${TARGET_NAME}
FILEDESCRIPTION "OpenVINO Preprocessing plugin")
endif()

target_include_directories(${TARGET_NAME} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<TARGET_PROPERTY:openvino,INTERFACE_INCLUDE_DIRECTORIES>)

# Static library used for unit tests which are always built

if(ENABLE_GAPI_PREPROCESSING)
add_library(${TARGET_NAME}_s STATIC EXCLUDE_FROM_ALL
$<TARGET_OBJECTS:${TARGET_NAME}_obj>)

set_ie_threading_interface_for(${TARGET_NAME}_s)

target_include_directories(${TARGET_NAME}_s INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")

if(WIN32)
set_target_properties(${TARGET_NAME}_s PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME}_s)
endif()

target_link_libraries(${TARGET_NAME}_s PRIVATE fluid openvino::itt openvino::runtime)

target_compile_definitions(${TARGET_NAME}_s INTERFACE USE_STATIC_IE)

set_target_properties(${TARGET_NAME}_s PROPERTIES EXCLUDE_FROM_ALL ON)
endif()

# LTO

if(TARGET ${TARGET_NAME}_obj)
set_target_properties(${TARGET_NAME}_obj ${TARGET_NAME}_s
PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
endif()

if(NOT library_type STREQUAL "INTERFACE")
set_target_properties(${TARGET_NAME}
PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
endif()

# developer package

openvino_developer_export_targets(COMPONENT core TARGETS ${TARGET_NAME})

# install

if(BUILD_SHARED_LIBS)
install(TARGETS ${TARGET_NAME}
LIBRARY DESTINATION ${OV_CPACK_PLUGINSDIR} COMPONENT ${OV_CPACK_COMP_CORE})
else()
ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})
if(ENABLE_TESTS)
add_subdirectory(tests)
endif()
Loading

0 comments on commit 0970bc8

Please sign in to comment.