OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
Exclude JAX FE from all distributions except wheel (#26610)
Ilya Lavrenov6af61f4d2f84
diff --git a/.github/workflows/fedora_29.yml b/.github/workflows/fedora_29.ymlindex ba4e8940f31..c243d11880f 100644--- a/.github/workflows/fedora_29.yml+++ b/.github/workflows/fedora_29.yml@@ -147,7 +147,7 @@ jobs:python3 -c 'from openvino import Core; Core().get_property("MULTI", "SUPPORTED_PROPERTIES")'python3 -c 'from openvino import Core; Core().get_property("HETERO", "SUPPORTED_PROPERTIES")'python3 -c 'from openvino import Core; Core().get_property("BATCH", "SUPPORTED_PROPERTIES")'- python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 7'+ python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 6'benchmark_app --helpopt_in_out --helpovc --helpdiff --git a/.github/workflows/job_debian_packages.yml b/.github/workflows/job_debian_packages.ymlindex 6933179edda..d7d7bf089b6 100644--- a/.github/workflows/job_debian_packages.yml+++ b/.github/workflows/job_debian_packages.yml@@ -93,7 +93,7 @@ jobs:python3 -c 'from openvino import Core; Core().get_property("MULTI", "SUPPORTED_PROPERTIES")'python3 -c 'from openvino import Core; Core().get_property("HETERO", "SUPPORTED_PROPERTIES")'python3 -c 'from openvino import Core; Core().get_property("BATCH", "SUPPORTED_PROPERTIES")'- python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 7'+ python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 6'benchmark_app --helpopt_in_out --helpovc --helpdiff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmakeindex 876d3f334a2..d2aa0410476 100644--- a/cmake/developer_package/frontends/frontends.cmake+++ b/cmake/developer_package/frontends/frontends.cmake@@ -104,13 +104,14 @@ endmacro()# FILEDESCRIPTION <description> # used on Windows to describe DLL file# [LINKABLE_FRONTEND] # whether we can use FE API directly or via FEM only# [SKIP_INSTALL] # private frontend, not for end users+# [DISABLE_CPP_INSTALL] # excludes frontend from all cmake rules# [PROTOBUF_REQUIRED] # options to denote that protobuf is used# [PROTOBUF_LITE] # requires only libprotobuf-lite# [SKIP_NCC_STYLE] # use custom NCC rules# [LINK_LIBRARIES <lib1 lib2 ...>])#macro(ov_add_frontend)- set(options LINKABLE_FRONTEND PROTOBUF_REQUIRED PROTOBUF_LITE SKIP_NCC_STYLE SKIP_INSTALL)+ set(options LINKABLE_FRONTEND PROTOBUF_REQUIRED PROTOBUF_LITE SKIP_NCC_STYLE SKIP_INSTALL DISABLE_CPP_INSTALL)set(oneValueArgs NAME FILEDESCRIPTION)set(multiValueArgs LINK_LIBRARIES PROTO_FILES)cmake_parse_arguments(OV_FRONTEND "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})@@ -306,6 +307,11 @@ macro(ov_add_frontend)# installationif(NOT OV_FRONTEND_SKIP_INSTALL)+ # convert option (OFF / ON) to actual value+ if(OV_FRONTEND_DISABLE_CPP_INSTALL)+ set(frontend_exclude_from_all EXCLUDE_FROM_ALL)+ endif()+if(BUILD_SHARED_LIBS)# Note:# we use 'framework' as component for deployment scenario, i.e. for libraries itself@@ -313,10 +319,9 @@ macro(ov_add_frontend)set(lib_component "${OV_FRONTEND_NAME}")set(dev_component "${OV_CPACK_COMP_CORE_DEV}")- # TODO: whether we need to do it configuralbe on Windows installer?ov_cpack_add_component(${lib_component} HIDDEN)- if(OV_FRONTEND_LINKABLE_FRONTEND)+ if(OV_FRONTEND_LINKABLE_FRONTEND AND NOT OV_FRONTEND_DISABLE_CPP_INSTALL)set(export_set EXPORT OpenVINOTargets)set(archive_dest ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${dev_component} ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})set(namelink NAMELINK_COMPONENT ${OV_CPACK_COMP_LINKS} ${OV_CPACK_COMP_LINKS_EXCLUDE_ALL})@@ -324,12 +329,13 @@ macro(ov_add_frontend)set(namelink NAMELINK_SKIP)endif()install(TARGETS ${TARGET_NAME} ${export_set}- RUNTIME DESTINATION ${OV_CPACK_RUNTIMEDIR} COMPONENT ${lib_component}+ RUNTIME DESTINATION ${OV_CPACK_RUNTIMEDIR} COMPONENT ${lib_component} ${frontend_exclude_from_all}${archive_dest}- LIBRARY DESTINATION ${OV_CPACK_LIBRARYDIR} COMPONENT ${lib_component}+ LIBRARY DESTINATION ${OV_CPACK_LIBRARYDIR} COMPONENT ${lib_component} ${frontend_exclude_from_all}${namelink})# export to build tree+ # Note: we keep this even with passed DISABLE_CPP_INSTALL to ensure that Python API can be builtif(OV_FRONTEND_LINKABLE_FRONTEND)export(TARGETS ${TARGET_NAME} NAMESPACE openvino::APPEND FILE "${CMAKE_BINARY_DIR}/OpenVINOTargets.cmake")@@ -338,7 +344,7 @@ macro(ov_add_frontend)ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})endif()- if(OV_FRONTEND_LINKABLE_FRONTEND)+ if(OV_FRONTEND_LINKABLE_FRONTEND AND NOT OV_FRONTEND_DISABLE_CPP_INSTALL)# install library development filesinstall(DIRECTORY ${${TARGET_NAME}_INCLUDE_DIR}/openvinoDESTINATION ${FRONTEND_INSTALL_INCLUDE}diff --git a/cmake/packaging/archive.cmake b/cmake/packaging/archive.cmakeindex 637d60507d0..a935f005495 100644--- a/cmake/packaging/archive.cmake+++ b/cmake/packaging/archive.cmake@@ -14,7 +14,9 @@ macro(ov_cpack_settings)# filter out some components, which are not needed to be wrapped to conda-forge | brew | conan | vcpkgif(NOT OV_CPACK_COMP_${UPPER_COMP}_EXCLUDE_ALL AND# python_package is not needed in case of archives, because components like pyopenvino are used, as well as wheels- NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*")+ NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*" AND+ # It was decided not to distribute JAX as C++ component+ NOT item STREQUAL "jax")list(APPEND CPACK_COMPONENTS_ALL ${item})endif()endforeach()diff --git a/cmake/packaging/common-libraries.cmake b/cmake/packaging/common-libraries.cmakeindex ecf91ed0ba8..5524da582d3 100644--- a/cmake/packaging/common-libraries.cmake+++ b/cmake/packaging/common-libraries.cmake@@ -16,7 +16,9 @@ macro(ov_cpack_settings)# because in case of VCPKG | CONAN | BREW | CONDA-FORGE distributions, python is either not needed or installed separately(NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*" OR ENABLE_PYTHON_PACKAGING) AND# the same for pugixml- NOT item STREQUAL "pugixml")+ NOT item STREQUAL "pugixml" AND+ # It was decided not to distribute JAX as C++ component+ NOT item STREQUAL "jax")list(APPEND CPACK_COMPONENTS_ALL ${item})endif()endforeach()diff --git a/cmake/packaging/debian.cmake b/cmake/packaging/debian.cmakeindex 88c7633639e..0eb020a5584 100644--- a/cmake/packaging/debian.cmake+++ b/cmake/packaging/debian.cmake@@ -58,7 +58,9 @@ macro(ov_cpack_settings)# don't install Intel OpenMPNOT item STREQUAL "omp" AND# the same for pugixml- NOT item STREQUAL "pugixml")+ NOT item STREQUAL "pugixml" AND+ # It was decided not to distribute JAX as C++ component+ NOT item STREQUAL "jax")list(APPEND CPACK_COMPONENTS_ALL ${item})endif()endforeach()@@ -236,7 +238,8 @@ macro(ov_cpack_settings)set(ir_copyright "generic")endif()- if(ENABLE_OV_JAX_FRONTEND)+ # It was decided not to distribute JAX as C++ component+ if(ENABLE_OV_JAX_FRONTEND AND OFF)set(CPACK_COMPONENT_JAX_DESCRIPTION "OpenVINO JAX Frontend")set(CPACK_COMPONENT_JAX_DEPENDS "${OV_CPACK_COMP_CORE}")set(CPACK_DEBIAN_JAX_PACKAGE_NAME "libopenvino-jax-frontend-${cpack_name_ver}")diff --git a/cmake/packaging/npm.cmake b/cmake/packaging/npm.cmakeindex a5a9f32fa0a..3b69f3d64b2 100644--- a/cmake/packaging/npm.cmake+++ b/cmake/packaging/npm.cmake@@ -14,8 +14,10 @@ macro(ov_cpack_settings)string(TOUPPER ${item} UPPER_COMP)# filter out some components, which are not needed to be wrapped to npm packageif(NOT OV_CPACK_COMP_${UPPER_COMP}_EXCLUDE_ALL AND- # python is not required for npm package- NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*")+ # python is not required for npm package+ NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*" AND+ # It was decided not to distribute JAX as C++ component+ NOT item STREQUAL "jax")list(APPEND CPACK_COMPONENTS_ALL ${item})endif()endforeach()diff --git a/cmake/packaging/nsis.cmake b/cmake/packaging/nsis.cmakeindex 0f4338a950b..f4452e46a5a 100644--- a/cmake/packaging/nsis.cmake+++ b/cmake/packaging/nsis.cmake@@ -11,7 +11,9 @@ macro(ov_cpack_settings)foreach(item IN LISTS cpack_components_all)# filter out some components, which are not needed to be wrapped to Windows packageif(# python wheels are not needed to be wrapped by NSIS installer- NOT item STREQUAL OV_CPACK_COMP_PYTHON_WHEELS)+ NOT item STREQUAL OV_CPACK_COMP_PYTHON_WHEELS AND+ # It was decided not to distribute JAX as C++ component+ NOT item STREQUAL "jax")list(APPEND CPACK_COMPONENTS_ALL ${item})endif()endforeach()diff --git a/cmake/packaging/rpm.cmake b/cmake/packaging/rpm.cmakeindex 98e601b3e13..cf915ee8524 100644--- a/cmake/packaging/rpm.cmake+++ b/cmake/packaging/rpm.cmake@@ -46,7 +46,9 @@ macro(ov_cpack_settings)# don't install Intel OpenMPNOT item STREQUAL "omp" AND# the same for pugixml- NOT item STREQUAL "pugixml")+ NOT item STREQUAL "pugixml" AND+ # It was decided not to distribute JAX as C++ component+ NOT item STREQUAL "jax")list(APPEND CPACK_COMPONENTS_ALL ${item})endif()endforeach()@@ -210,7 +212,8 @@ macro(ov_cpack_settings)set(ir_copyright "generic")endif()- if(ENABLE_OV_JAX_FRONTEND)+ # It was decided not to distribute JAX as C++ component+ if(ENABLE_OV_JAX_FRONTEND AND OFF)set(CPACK_COMPONENT_JAX_DESCRIPTION "OpenVINO JAX Frontend")set(CPACK_RPM_JAX_PACKAGE_NAME "libopenvino-jax-frontend-${cpack_name_ver}")set(CPACK_RPM_JAX_POST_INSTALL_SCRIPT_FILE "${def_triggers}")diff --git a/cmake/templates/OpenVINOConfig.cmake.in b/cmake/templates/OpenVINOConfig.cmake.inindex c65bb8f44da..46550e36aac 100644--- a/cmake/templates/OpenVINOConfig.cmake.in+++ b/cmake/templates/OpenVINOConfig.cmake.in@@ -11,7 +11,6 @@## * `Runtime`: OpenVINO C++ and C Core & Inference Runtime, frontend common# * `Threading`: OpenVINO threading backend for parallel.hpp-# * `JAX`: OpenVINO JAX frontend# * `ONNX`: OpenVINO ONNX frontend# * `Paddle`: OpenVINO Paddle frontend# * `PyTorch`: OpenVINO PyTorch frontend@@ -46,9 +45,6 @@## Frontend specific targets:#-# `openvino::frontend::jax`-# JAX FrontEnd target (optional)-## `openvino::frontend::onnx`# ONNX FrontEnd target (optional)#@@ -75,9 +71,6 @@# `OpenVINO_Runtime_FOUND`# OpenVINO C++ Core & Inference Runtime is available#-# `OpenVINO_Frontend_JAX_FOUND`-# OpenVINO JAX frontend is available-## `OpenVINO_Frontend_ONNX_FOUND`# OpenVINO ONNX frontend is available#@@ -550,7 +543,7 @@ unset(_OV_ENABLE_OPENVINO_BUILD_SHARED)set(_ov_imported_libs openvino::runtime openvino::runtime::copenvino::frontend::onnx openvino::frontend::paddle openvino::frontend::tensorflow- openvino::frontend::pytorch openvino::frontend::tensorflow_lite openvino::frontend::jax)+ openvino::frontend::pytorch openvino::frontend::tensorflow_lite)if(_ov_as_external_package)foreach(target IN LISTS _ov_imported_libs)@@ -590,7 +583,6 @@ set(${CMAKE_FIND_PACKAGE_NAME}_TensorFlow_FOUND @ENABLE_OV_TF_FRONTEND@)set(${CMAKE_FIND_PACKAGE_NAME}_TensorFlowLite_FOUND @ENABLE_OV_TF_LITE_FRONTEND@)set(${CMAKE_FIND_PACKAGE_NAME}_IR_FOUND @ENABLE_OV_IR_FRONTEND@)set(${CMAKE_FIND_PACKAGE_NAME}_PyTorch_FOUND @ENABLE_OV_PYTORCH_FRONTEND@)-set(${CMAKE_FIND_PACKAGE_NAME}_JAX_FOUND @ENABLE_OV_JAX_FRONTEND@)set(${CMAKE_FIND_PACKAGE_NAME}_Frontend_ONNX_FOUND ${${CMAKE_FIND_PACKAGE_NAME}_ONNX_FOUND})set(${CMAKE_FIND_PACKAGE_NAME}_Frontend_Paddle_FOUND ${${CMAKE_FIND_PACKAGE_NAME}_Paddle_FOUND})@@ -598,7 +590,6 @@ set(${CMAKE_FIND_PACKAGE_NAME}_Frontend_TensorFlow_FOUND ${${CMAKE_FIND_PACKAGE_set(${CMAKE_FIND_PACKAGE_NAME}_Frontend_TensorFlowLite_FOUND ${${CMAKE_FIND_PACKAGE_NAME}_TensorFlowLite_FOUND})set(${CMAKE_FIND_PACKAGE_NAME}_Frontend_IR_FOUND ${${CMAKE_FIND_PACKAGE_NAME}_IR_FOUND})set(${CMAKE_FIND_PACKAGE_NAME}_Frontend_PyTorch_FOUND ${${CMAKE_FIND_PACKAGE_NAME}_PyTorch_FOUND})-set(${CMAKE_FIND_PACKAGE_NAME}_Frontend_JAX_FOUND ${${CMAKE_FIND_PACKAGE_NAME}_JAX_FOUND})# if no components specified, only Runtime is providedif(NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS)@@ -653,6 +644,5 @@ unset(${CMAKE_FIND_PACKAGE_NAME}_ONNX_FOUND)unset(${CMAKE_FIND_PACKAGE_NAME}_TensorFlow_FOUND)unset(${CMAKE_FIND_PACKAGE_NAME}_TensorFlowLite_FOUND)unset(${CMAKE_FIND_PACKAGE_NAME}_PyTorch_FOUND)-unset(${CMAKE_FIND_PACKAGE_NAME}_JAX_FOUND)cmake_policy(POP)diff --git a/src/frontends/jax/src/CMakeLists.txt b/src/frontends/jax/src/CMakeLists.txtindex d31c81f1e19..47b311677b3 100644--- a/src/frontends/jax/src/CMakeLists.txt+++ b/src/frontends/jax/src/CMakeLists.txt@@ -8,5 +8,6 @@ endif()ov_add_frontend(NAME jaxLINKABLE_FRONTEND+ DISABLE_CPP_INSTALLFILEDESCRIPTION "FrontEnd to load and convert JAX/Flax models"LINK_LIBRARIES openvino::util openvino::core::dev)diff --git a/src/frontends/tests/frontend/shared/test_builtin_extensions/CMakeLists.txt b/src/frontends/tests/frontend/shared/test_builtin_extensions/CMakeLists.txtindex daf41cde458..e43f5303104 100644--- a/src/frontends/tests/frontend/shared/test_builtin_extensions/CMakeLists.txt+++ b/src/frontends/tests/frontend/shared/test_builtin_extensions/CMakeLists.txt@@ -40,11 +40,6 @@ if (ENABLE_OV_PYTORCH_FRONTEND)list(APPEND DEFINITIONS ENABLE_OV_PYTORCH_FRONTEND)endif()-if (ENABLE_OV_JAX_FRONTEND)- list(APPEND DEPENDENCIES openvino::frontend::jax)- list(APPEND DEFINITIONS ENABLE_OV_JAX_FRONTEND)-endif()-# Create libraryadd_library(${TARGET_NAME} MODULE ${LIBRARY_SRC} ${LIBRARY_HEADERS})