Skip to content

Commit

Permalink
Merge branch 'master' into accert
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalandi authored Jun 26, 2024
2 parents 40dc2cb + fc4237b commit 475913f
Show file tree
Hide file tree
Showing 165 changed files with 4,134 additions and 1,131 deletions.
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
/src/frontends/tensorflow_common/ @openvinotoolkit/openvino-tf-frontend-maintainers
/src/frontends/tensorflow_lite/ @openvinotoolkit/openvino-tf-frontend-maintainers
/src/frontends/pytorch/ @openvinotoolkit/openvino-pytorch-frontend-maintainers
/src/frontends/jax/ @openvinotoolkit/openvino-jax-frontend-maintainers

# OpenVINO ONNX Frontend:
/src/frontends/onnx/ @openvinotoolkit/openvino-onnx-frontend-maintainers
Expand All @@ -99,7 +100,7 @@
/tests/layer_tests/ @openvinotoolkit/openvino-tests-maintainers @openvinotoolkit/openvino-mo-maintainers
/tests/layer_tests/pytorch_tests/ @openvinotoolkit/openvino-pytorch-frontend-maintainers
/tests/layer_tests/tensorflow_tests @openvinotoolkit/openvino-tf-frontend-maintainers
/tests/layer_tests/jax_tests @openvinotoolkit/openvino-tf-frontend-maintainers
/tests/layer_tests/jax_tests @openvinotoolkit/openvino-tf-frontend-maintainers @openvinotoolkit/openvino-jax-frontend-maintainers
/tests/model_hub_tests @openvinotoolkit/openvino-tf-frontend-maintainers
/tests/model_hub_tests/pytorch @openvinotoolkit/openvino-pytorch-frontend-maintainers

Expand Down
23 changes: 19 additions & 4 deletions .github/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ LP_transformations:
- TFL_FE
- ONNX_FE
- PDPD_FE
- JAX_FE
build:
- TOKENIZERS # TF_FE tests depends on tokenizers build

preprocessing:
revalidate:
Expand All @@ -32,12 +35,14 @@ CPU:
- PyTorch_FE
- TF_FE
- ONNX_FE
- JAX_FE
build:
- AUTO
- HETERO
- AUTO_BATCH
- TEMPLATE
- IR_FE
- TOKENIZERS # TF_FE tests depends on tokenizers build

GPU:
build:
Expand Down Expand Up @@ -124,7 +129,7 @@ TF_FE:
build:
- CPU
- Python_API
- TOKENIZERS
- TOKENIZERS # TF_FE tests depends on tokenizers build

TFL_FE:
revalidate:
Expand All @@ -139,7 +144,13 @@ PyTorch_FE:
build:
- CPU
- Python_API
- TOKENIZERS

JAX_FE:
revalidate:
- MO
build:
- CPU
- Python_API

C_API:
build:
Expand All @@ -155,6 +166,7 @@ Python_API:
- samples
- MO
- tools
- TF_FE
build:
- CPU
- HETERO
Expand All @@ -164,9 +176,10 @@ Python_API:
- IR_FE
- ONNX_FE
- PDPD_FE
- TF_FE
- TFL_FE
- PyTorch_FE
- JAX_FE
- TOKENIZERS # TF_FE tests depends on tokenizers build

JS_API:
build:
Expand Down Expand Up @@ -200,6 +213,7 @@ MO:
- TF_FE
build:
- Python_API
- TOKENIZERS # TF_FE tests depends on tokenizers build

tools:
build:
Expand All @@ -223,5 +237,6 @@ ONNX_RT:
build: []

TOKENIZERS:
revalidate: []
revalidate:
- TF_FE
build: []
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@
- any: ['tests/model_hub_tests/**',
'!tests/model_hub_tests/tensorflow/**/*']

'category: JAX FE':
- 'src/frontends/jax/**/*'
- 'tests/layer_tests/jax_tests/**/*'

'category: tools':
- any: ['tools/**',
'!tools/mo/**/*',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: suggester / clang-format
if: startsWith(github.event_name, 'pull_request')
uses: reviewdog/action-suggester@42b08604516990e201b3c21902cc13c6a0ee5fe8 # v1.14.0
uses: reviewdog/action-suggester@a1d57ff096639094e0ba35ef3039e79316364796 # v1.15.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
level: warning
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,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()) == 6'
python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 7'
benchmark_app --help
ovc --help
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_debian_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,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()) == 6'
python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 7'
benchmark_app --help
opt_in_out --help
ovc --help
8 changes: 8 additions & 0 deletions .github/workflows/job_python_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,14 @@ jobs:
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: JAX Layer Tests - JAX FE
if: ${{ fromJSON(inputs.affected-components).JAX_FE.test && runner.arch != 'ARM64' && runner.os != 'macOS' }}
run: python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/jax_tests/ -m precommit_jax_fe --junitxml=${INSTALL_TEST_DIR}/TEST-jax_fe.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
JAX_TRACE_MODE: JAXPR

- name: TensorFlow Lite Layer Tests - TFL FE
if: fromJSON(inputs.affected-components).TFL_FE.test
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/job_samples_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
description: 'Machine on which the tests would run'
type: string
required: true
image:
description: 'Docker image in which the tests would run'
container:
description: 'JSON to be converted to the value of the "container" configuration for the job'
type: string
required: false
default: null
default: '{"image": null}'
affected-components:
description: 'Components that are affected by changes in the commit defined by the Smart CI Action'
type: string
Expand All @@ -21,9 +21,9 @@ permissions: read-all

jobs:
Samples:
timeout-minutes: 30
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.image }}
container: ${{ fromJSON(inputs.container) }}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -66,6 +66,8 @@ jobs:
run: brew install coreutils

- name: Fetch setup_python action
# Python is already installed on Ubuntu within Dockerfile
if: runner.os != 'Linux'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
sparse-checkout: |
Expand All @@ -74,6 +76,8 @@ jobs:
path: 'openvino'

- name: Setup Python 3.11
# Python is already installed on Ubuntu within Dockerfile
if: runner.os != 'Linux'
uses: ./openvino/.github/actions/setup_python
with:
version: '3.11'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ jobs:
uses: ./.github/workflows/job_samples_tests.yml
with:
runner: 'aks-linux-4-cores-16gb'
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_x64 }}
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_x64 }}", "volumes": ["/mount:/mount"]}'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}

JS_API:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ jobs:
uses: ./.github/workflows/job_samples_tests.yml
with:
runner: 'aks-linux-16-cores-arm'
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_arm64 }}
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_arm64 }}", "volumes": ["/mount:/mount"]}'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}

JS_API:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linux_conditional_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ jobs:
-DENABLE_OV_TF_LITE_FRONTEND=OFF \
-DENABLE_OV_PADDLE_FRONTEND=OFF \
-DENABLE_OV_PYTORCH_FRONTEND=OFF \
-DENABLE_OV_JAX_FRONTEND=OFF \
-DENABLE_OV_ONNX_FRONTEND=OFF \
-DSELECTIVE_BUILD_STAT=${SELECTIVE_BUILD_STAT_DIR}/*.csv \
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linux_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ jobs:
-DENABLE_OV_TF_LITE_FRONTEND=ON \
-DENABLE_OV_PADDLE_FRONTEND=ON \
-DENABLE_OV_PYTORCH_FRONTEND=ON \
-DENABLE_OV_JAX_FRONTEND=ON \
-DENABLE_OV_ONNX_FRONTEND=ON \
-DENABLE_ONEDNN_FOR_GPU=OFF \
-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows_conditional_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ jobs:
-DENABLE_OV_TF_LITE_FRONTEND=OFF `
-DENABLE_OV_PADDLE_FRONTEND=OFF `
-DENABLE_OV_PYTORCH_FRONTEND=OFF `
-DENABLE_OV_JAX_FRONTEND=OFF `
-DENABLE_OV_ONNX_FRONTEND=OFF `
-DSELECTIVE_BUILD_STAT=${{ env.SELECTIVE_BUILD_STAT_DIR }}\*.csv `
-S ${{ env.OPENVINO_REPO }} `
Expand Down
7 changes: 7 additions & 0 deletions cmake/coverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ if(ENABLE_OV_IR_FRONTEND)
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()

if(ENABLE_OV_JAX_FRONTEND)
ov_coverage_extract(INPUT "openvino" OUTPUT "jax_frontend"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/frontends/jax/*")
ov_coverage_genhtml(INFO_FILE "jax_frontend"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()

if(ENABLE_OV_ONNX_FRONTEND)
ov_coverage_extract(INPUT "openvino" OUTPUT "onnx_frontend"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/frontends/onnx/*")
Expand Down
14 changes: 11 additions & 3 deletions cmake/developer_package/api_validator/api_validator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
# SPDX-License-Identifier: Apache-2.0
#

if(WIN32)
function(ov_search_api_validator)
if(NOT ENABLE_API_VALIDATOR)
return()
endif()

# CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION is only set when
# Visual Studio generators are used, but we need it
# when we use Ninja as well
Expand All @@ -11,8 +15,10 @@ if(WIN32)
string(REPLACE "\\" "" WINDOWS_SDK_VERSION $ENV{WindowsSDKVersion})
set(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION ${WINDOWS_SDK_VERSION})
message(STATUS "Use ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} Windows SDK version")
# set to parent scope as well for later usage in '_ov_add_api_validator_post_build_step'
set(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION ${WINDOWS_SDK_VERSION} PARENT_SCOPE)
else()
message(FATAL_ERROR "WindowsSDKVersion environment variable is not set,\
message(FATAL_ERROR "WindowsSDKVersion environment variable is not set,\
can't find Windows SDK version. Try to use vcvarsall.bat script")
endif()
endif()
Expand Down Expand Up @@ -41,7 +47,9 @@ can't find Windows SDK version. Try to use vcvarsall.bat script")
message(STATUS "Found apivalidator: ${ONECORE_API_VALIDATOR}")
endif()
endif()
endif()
endfunction()

ov_search_api_validator()

function(_ov_add_api_validator_post_build_step_recursive)
cmake_parse_arguments(API_VALIDATOR "" "TARGET" "" ${ARGN})
Expand Down
1 change: 1 addition & 0 deletions cmake/developer_package/compile_flags/sdl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG OR OV_COMPILER_IS_INTEL_LLVM
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(OV_C_CXX_FLAGS "${OV_C_CXX_FLAGS} /sdl /guard:cf")
set(OV_LINKER_FLAGS "${OV_LINKER_FLAGS} /guard:cf")
endif()

if(ENABLE_QSPECTRE)
Expand Down
3 changes: 3 additions & 0 deletions cmake/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ endif()
ov_option(ENABLE_OV_PADDLE_FRONTEND "Enable PaddlePaddle FrontEnd" ON)
ov_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON)
ov_option(ENABLE_OV_PYTORCH_FRONTEND "Enable PyTorch FrontEnd" ON)
ov_option(ENABLE_OV_JAX_FRONTEND "Enable JAX FrontEnd" ON)
ov_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON)
ov_option(ENABLE_OV_TF_FRONTEND "Enable TensorFlow FrontEnd" ON)
ov_option(ENABLE_OV_TF_LITE_FRONTEND "Enable TensorFlow Lite FrontEnd" ON)
Expand Down Expand Up @@ -192,6 +193,8 @@ ov_dependent_option(ENABLE_JS "Enables JS API building" ON "NOT ANDROID;NOT EMSC

ov_option(ENABLE_OPENVINO_DEBUG "Enable output for OPENVINO_DEBUG statements" OFF)

ov_dependent_option (ENABLE_API_VALIDATOR "Enables API Validator usage" ON "WIN32" OFF)

if(NOT BUILD_SHARED_LIBS AND ENABLE_OV_TF_FRONTEND)
set(FORCE_FRONTENDS_USE_PROTOBUF ON)
else()
Expand Down
13 changes: 13 additions & 0 deletions cmake/packaging/debian.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,19 @@ macro(ov_cpack_settings)
set(ir_copyright "generic")
endif()

if(ENABLE_OV_JAX_FRONTEND)
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}")
# since we JAX FE is linkable target, we need to call ldconfig (i.e. `def_triggers`)
set(CPACK_DEBIAN_JAX_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}")
ov_debian_add_lintian_suppression(jax
# we have different package name strategy; it suggests libopenvino-jax-frontend202230
"package-name-doesnt-match-sonames")
list(APPEND frontends jax)
set(jax_copyright "generic")
endif()

if(ENABLE_OV_ONNX_FRONTEND)
set(CPACK_COMPONENT_ONNX_DESCRIPTION "OpenVINO ONNX Frontend")
set(CPACK_COMPONENT_ONNX_DEPENDS "${OV_CPACK_COMP_CORE}")
Expand Down
9 changes: 9 additions & 0 deletions cmake/packaging/rpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,15 @@ macro(ov_cpack_settings)
set(ir_copyright "generic")
endif()

if(ENABLE_OV_JAX_FRONTEND)
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}")
set(CPACK_RPM_JAX_POST_UNINSTALL_SCRIPT_FILE "${def_triggers}")
_ov_add_package(frontend_packages jax)
set(jax_copyright "generic")
endif()

if(ENABLE_OV_ONNX_FRONTEND)
set(CPACK_COMPONENT_ONNX_DESCRIPTION "OpenVINO ONNX Frontend")
set(CPACK_RPM_ONNX_PACKAGE_NAME "libopenvino-onnx-frontend-${cpack_name_ver}")
Expand Down
Loading

0 comments on commit 475913f

Please sign in to comment.