Unbrick TF FE (#13779)
This commit is contained in:
parent
985bdc1138
commit
90427b019e
@ -415,10 +415,7 @@ jobs:
|
||||
displayName: 'Paddle Frontend UT'
|
||||
continueOnError: false
|
||||
|
||||
- script: |
|
||||
# tensorflow frontend is not distributed to end users, we have to find it manually
|
||||
export OV_FRONTEND_PATH=$(INSTALL_TEST_DIR)
|
||||
$(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml
|
||||
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml
|
||||
displayName: 'TensorFlow Frontend Unit Tests'
|
||||
continueOnError: false
|
||||
|
||||
@ -516,7 +513,6 @@ jobs:
|
||||
. $(PY_VENV)/bin/activate
|
||||
python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt
|
||||
export PYTHONPATH=$(REPO_DIR)/tools/mo/:$(LAYER_TESTS_DIR):$PYTHONPATH
|
||||
export OV_FRONTEND_PATH=$(INSTALL_DIR)/runtime/lib/intel64
|
||||
export TEST_DEVICE=CPU
|
||||
$(RUN_PREFIX) python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=$(INSTALL_TEST_DIR)/TEST-tf_fe.xmlTEST
|
||||
displayName: 'TensorFlow 1 Layer Tests - TF FE'
|
||||
@ -526,7 +522,6 @@ jobs:
|
||||
. $(PY_VENV)/bin/activate
|
||||
python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt
|
||||
export PYTHONPATH=$(REPO_DIR)/tools/mo/:$(LAYER_TESTS_DIR):$PYTHONPATH
|
||||
export OV_FRONTEND_PATH=$(INSTALL_DIR)/runtime/lib/intel64
|
||||
export TEST_DEVICE=CPU
|
||||
$(RUN_PREFIX) python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow2_keras_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=$(INSTALL_TEST_DIR)/TEST-tf2_fe.xmlTEST
|
||||
displayName: 'TensorFlow 2 Layer Tests - TF FE'
|
||||
|
@ -335,8 +335,7 @@ jobs:
|
||||
continueOnError: false
|
||||
|
||||
- script: |
|
||||
export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR):$LD_LIBRARY_PATH
|
||||
export OV_FRONTEND_PATH=$(INSTALL_TEST_DIR)
|
||||
export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR)
|
||||
$(INSTALL_TEST_DIR)/ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml
|
||||
displayName: 'TensorFlow Frontend Unit Tests'
|
||||
continueOnError: false
|
||||
|
@ -24,8 +24,6 @@ macro(ov_cpack_settings)
|
||||
NOT item MATCHES "^tbb(_dev)?$" AND
|
||||
# the same for pugixml
|
||||
NOT item STREQUAL "pugixml" AND
|
||||
# TF component is not released
|
||||
NOT item STREQUAL "tensorflow" AND
|
||||
# we have `license_file` field in conda meta.yml
|
||||
NOT item STREQUAL OV_CPACK_COMP_LICENSING AND
|
||||
# compile_tool is not needed
|
||||
|
@ -57,8 +57,6 @@ macro(ov_cpack_settings)
|
||||
NOT item MATCHES "^tbb(_dev)?$" AND
|
||||
# the same for pugixml
|
||||
NOT item STREQUAL "pugixml" AND
|
||||
# TF component is not released
|
||||
NOT item STREQUAL "tensorflow" AND
|
||||
# we have copyright file for debian package
|
||||
NOT item STREQUAL OV_CPACK_COMP_LICENSING AND
|
||||
# compile_tool is not needed
|
||||
@ -247,7 +245,7 @@ macro(ov_cpack_settings)
|
||||
set(onnx_copyright "onnx")
|
||||
endif()
|
||||
|
||||
if(ENABLE_OV_TF_FRONTEND AND "tensorflow" IN_LIST CPACK_COMPONENTS_ALL)
|
||||
if(ENABLE_OV_TF_FRONTEND)
|
||||
set(CPACK_COMPONENT_TENSORFLOW_DESCRIPTION "OpenVINO TensorFlow Frontend")
|
||||
set(CPACK_COMPONENT_TENSORFLOW_DEPENDS "${OV_CPACK_COMP_CORE}")
|
||||
set(CPACK_DEBIAN_TENSORFLOW_PACKAGE_NAME "libopenvino-tensorflow-frontend-${cpack_name_ver}")
|
||||
|
@ -57,8 +57,6 @@ macro(ov_cpack_settings)
|
||||
NOT item MATCHES "^tbb(_dev)?$" AND
|
||||
# the same for pugixml
|
||||
NOT item STREQUAL "pugixml" AND
|
||||
# TF component is not released
|
||||
NOT item STREQUAL "tensorflow" AND
|
||||
# we have copyright file for rpm package
|
||||
NOT item STREQUAL OV_CPACK_COMP_LICENSING AND
|
||||
# compile_tool is not needed
|
||||
@ -233,7 +231,7 @@ macro(ov_cpack_settings)
|
||||
set(onnx_copyright "onnx")
|
||||
endif()
|
||||
|
||||
if(ENABLE_OV_TF_FRONTEND AND "tensorflow" IN_LIST CPACK_COMPONENTS_ALL)
|
||||
if(ENABLE_OV_TF_FRONTEND)
|
||||
set(CPACK_COMPONENT_TENSORFLOW_DESCRIPTION "OpenVINO TensorFlow Frontend")
|
||||
set(CPACK_COMPONENT_TENSORFLOW_DEPENDS "${OV_CPACK_COMP_CORE}")
|
||||
set(CPACK_RPM_TENSORFLOW_PACKAGE_NAME "libopenvino-tensorflow-frontend-${cpack_name_ver}")
|
||||
|
@ -126,13 +126,13 @@ LIB_INSTALL_CFG = {
|
||||
"rpath": LIBS_RPATH,
|
||||
"binary_dir": OPENVINO_BUILD_DIR,
|
||||
},
|
||||
# uncomment once TF FE will be used in MO
|
||||
# "tensorflow_libs": { # noqa: E800
|
||||
# "name": "tensorflow", # noqa: E800
|
||||
# "prefix": "libs.core", # noqa: E800
|
||||
# "install_dir": OV_RUNTIME_LIBS_DIR, # noqa: E800
|
||||
# "binary_dir": OPENVINO_BUILD_DIR, # noqa: E800
|
||||
# }, # noqa: E800
|
||||
"tensorflow_libs": {
|
||||
"name": "tensorflow",
|
||||
"prefix": "libs.tensorflow",
|
||||
"install_dir": OV_RUNTIME_LIBS_DIR,
|
||||
"rpath": LIBS_RPATH,
|
||||
"binary_dir": OPENVINO_BUILD_DIR,
|
||||
},
|
||||
}
|
||||
|
||||
PY_INSTALL_CFG = {
|
||||
|
@ -8,23 +8,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
ie_add_compiler_flags(/wd4267)
|
||||
endif()
|
||||
|
||||
if(NOT CPACK_GENERATOR MATCHES "^(DEB|RPM|CONDA-FORGE|BREW)$")
|
||||
set(linkable_frontend LINKABLE_FRONTEND)
|
||||
endif()
|
||||
|
||||
ov_add_frontend(NAME tensorflow
|
||||
${linkable_frontend}
|
||||
LINKABLE_FRONTEND
|
||||
FILEDESCRIPTION "FrontEnd to load and convert TensorFlow file format"
|
||||
LINK_LIBRARIES openvino::util openvino::runtime::dev)
|
||||
|
||||
# give a different name during installation to OpenVINO package
|
||||
set(target_name "${FRONTEND_NAME_PREFIX}tensorflow${FRONTEND_NAME_SUFFIX}")
|
||||
set_target_properties(${target_name} PROPERTIES OUTPUT_NAME openvino_tensorflow_fe)
|
||||
|
||||
if(NOT TARGET openvino::frontend::tensorflow)
|
||||
add_library(openvino::frontend::tensorflow ALIAS ${target_name})
|
||||
endif()
|
||||
|
||||
# add object library used in tests for private transformations
|
||||
|
||||
add_library(openvino_tensorflow_frontend_static_tests STATIC EXCLUDE_FROM_ALL
|
||||
|
@ -72,33 +72,4 @@ endif()
|
||||
get_target_property(TENSORFLOW_FRONTEND_SRC_DIR openvino_tensorflow_frontend SOURCE_DIR)
|
||||
|
||||
add_subdirectory(standalone_build)
|
||||
|
||||
#
|
||||
# Install TensorFlow frontend for tests reasons
|
||||
#
|
||||
|
||||
function(ov_frontend_get_file_name target_name library_name)
|
||||
set(LIB_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
|
||||
|
||||
set(LIB_SUFFIX "${IE_BUILD_POSTFIX}")
|
||||
if(APPLE)
|
||||
set(LIB_SUFFIX "${LIB_SUFFIX}${OpenVINO_VERSION_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
else()
|
||||
set(LIB_SUFFIX "${LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}${OpenVINO_VERSION_SUFFIX}")
|
||||
endif()
|
||||
|
||||
set("${library_name}" "${LIB_PREFIX}${target_name}${LIB_SUFFIX}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
set(target_name "${FRONTEND_NAME_PREFIX}tensorflow${FRONTEND_NAME_SUFFIX}")
|
||||
ov_frontend_get_file_name(${target_name} output_name)
|
||||
|
||||
# install with original name for tests component
|
||||
install(FILES $<TARGET_FILE:${target_name}>
|
||||
DESTINATION tests
|
||||
COMPONENT tests
|
||||
RENAME ${output_name}
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
install(TARGETS ${target_name}
|
||||
LIBRARY DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL)
|
||||
add_dependencies(${TARGET_NAME} tensorflow_fe_standalone_build_test)
|
||||
|
Loading…
Reference in New Issue
Block a user