Skip to content

Commit

Permalink
Merge branch 'master' into mvafin/pt_fe/tuple_unpack_in_if
Browse files Browse the repository at this point in the history
  • Loading branch information
mvafin authored Sep 28, 2023
2 parents 32c415f + 744f5d4 commit ccbe497
Show file tree
Hide file tree
Showing 75 changed files with 1,213 additions and 1,028 deletions.
147 changes: 147 additions & 0 deletions .github/workflows/android_arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: Android ARM64 with vcpkg
on:
workflow_dispatch:
pull_request:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
push:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
branches:
- master

concurrency:
# github.ref is not unique in post-commit
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-android-arm64-vcpkg
cancel-in-progress: true

jobs:
Build:
defaults:
run:
shell: bash
runs-on: aks-linux-16-cores
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
volumes:
- /mount/caches:/mount/caches
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
CMAKE_GENERATOR: 'Ninja'
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CMAKE_C_COMPILER_LAUNCHER: ccache
OPENVINO_REPO: '/__w/openvino/openvino/openvino'
VCPKG_ROOT: '/__w/openvino/openvino/vcpkg'
BUILD_DIR: '/__w/openvino/openvino/build'
ANDROID_TOOLS: '/__w/openvino/openvino/android_tools'
ANDROID_NDK_HOME: '/__w/openvino/openvino/android_tools/ndk-bundle'
ANDROID_SDK_VERSION: 29
ANDROID_ABI_CONFIG: arm64-v8a
VCPKG_DEFAULT_BINARY_CACHE: '/mount/caches/ccache/android_arm64/vcpkg_cache'
VCPKG_FORCE_SYSTEM_BINARIES: '1'
CCACHE_DIR: '/mount/caches/ccache/android_arm64'
CCACHE_TEMPDIR: '/__w/openvino/openvino/ccache_temp'
CCACHE_COMPILERCHECK: 'content'
CCACHE_MAXSIZE: 50G
steps:
- name: Install git
run: apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates

- name: Clone OpenVINO
uses: actions/checkout@v4
with:
path: 'openvino'

- name: Init submodules for non vcpkg dependencies
run: |
pushd ${OPENVINO_REPO}
git submodule update --init -- ${OPENVINO_REPO}/src/plugins
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo
popd
- name: Clone vcpkg
uses: actions/checkout@v4
with:
repository: 'microsoft/vcpkg'
path: 'vcpkg'
fetch-depth: '0'

#
# Dependencies
#

- name: Install dependencies
run: |
# generic dependencies
apt --assume-yes install ccache scons ninja-build build-essential python3-pip
# vcpkg requires cmake 3.19 or later
python3 -m pip install -U pip cmake
# vcpkg's tool dependencies
apt --assume-yes install curl zip unzip tar
# vcpkg 'python3' port dependencies
apt --assume-yes install autoconf libtool autoconf-archive
# vcpkg tree of dependencies require extra packages
apt --assume-yes install pkg-config linux-libc-dev
# Install Android SDK, NDK and Tools
apt -y --no-install-recommends install unzip wget default-jdk
wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
unzip commandlinetools-linux-7583922_latest.zip
echo "yes" | ./cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_TOOLS} --install "ndk-bundle" "platform-tools" "platforms;android-${{ env.ANDROID_SDK_VERSION }}"
#
# Build
#

- name: Build vcpkg
run: |
mkdir -p ${VCPKG_DEFAULT_BINARY_CACHE}
${VCPKG_ROOT}/bootstrap-vcpkg.sh
# patch vcpkg default toolchain to build only Release configuration
echo "set(VCPKG_BUILD_TYPE release)" >> ${VCPKG_ROOT}/triplets/arm64-android.cmake
- name: CMake - configure
run: |
cmake \
-G '${{ env.CMAKE_GENERATOR }}' \
-DENABLE_INTEL_GPU=ON \
-DENABLE_TESTS=ON \
-DENABLE_SYSTEM_OPENCL=ON \
-DENABLE_SYSTEM_PROTOBUF=ON \
-DENABLE_SYSTEM_PUGIXML=ON \
-DENABLE_SYSTEM_SNAPPY=ON \
-DENABLE_SYSTEM_TBB=ON \
-DENABLE_SYSTEM_FLATBUFFERS=ON \
-DANDROID_ABI=${{ env.ANDROID_ABI_CONFIG }} \
-DANDROID_PLATFORM=${{ env.ANDROID_SDK_VERSION }} \
-DVCPKG_TARGET_TRIPLET=arm64-android \
-DVCPKG_HOST_TRIPLET=x64-linux-release \
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
-S ${OPENVINO_REPO} \
-B ${BUILD_DIR}
- name: Clean ccache stats
run: ccache --zero-stats --show-config

- name: Cmake - build
run: cmake --build ${BUILD_DIR} --parallel

- name: Show ccache stats
run: ccache --show-stats
4 changes: 0 additions & 4 deletions .github/workflows/build_doc.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Documentation
on:
pull_request:
push:
branches:
- 'master'
- 'releases/**'

env:
DOXY_VER: '1.9.6'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ jobs:
- name: Install Clang dependency
run: |
sudo apt update
sudo apt --assume-yes remove clang-7 clang-8 clang-9 clang-10 clang-11 clang-12 clang-13
sudo apt --assume-yes install libclang-14-dev
sudo apt --assume-yes remove clang-7 clang-8 clang-9 clang-10 clang-11 clang-12 clang-13 clang-15
sudo apt --assume-yes install clang-14 libclang-14-dev
- name: Install Python-based dependencies
run: python3 -m pip install -r cmake/developer_package/ncc_naming_style/requirements_dev.txt
Expand Down
34 changes: 20 additions & 14 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ jobs:
- name: Install build dependencies
run: |
bash ${OPENVINO_REPO}/install_build_dependencies.sh
# openjdk-11-jdk - Java API
# default-jdk - Java API
# libssl1.1 - 'python3 -m pip' in self-hosted runner
# unzip - to download ninja
apt install --assume-yes --no-install-recommends openjdk-11-jdk libssl1.1 unzip
apt install --assume-yes --no-install-recommends default-jdk libssl1.1 unzip
wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip
unzip ninja-linux.zip
Expand Down Expand Up @@ -787,7 +787,7 @@ jobs:
defaults:
run:
shell: bash
runs-on: aks-linux-4-cores
runs-on: aks-linux-8-cores
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
env:
Expand Down Expand Up @@ -874,15 +874,22 @@ jobs:
defaults:
run:
shell: bash
runs-on: ${{ github.event_name == 'schedule' && 'ubuntu-20.04-8-cores' || 'ubuntu-20.04'}}
runs-on: ${{ github.event_name == 'schedule' && 'aks-linux-16-cores' || 'aks-linux-4-cores'}}
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
volumes:
- /mount/caches:/mount/caches
env:
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests

steps:
- name: Create Directories
run: mkdir -p ${{ env.INSTALL_DIR }} ${{ env.INSTALL_TEST_DIR }}
run: mkdir -p ${INSTALL_DIR} ${INSTALL_TEST_DIR}

- name: Install 'actions/setup-python@v4' dependencies
run: apt-get update && apt-get install -y libssl1.1 ca-certificates

- uses: actions/setup-python@v4
with:
Expand All @@ -902,26 +909,25 @@ jobs:

- name: Extract OpenVINO packages
run: |
pushd ${{ env.INSTALL_DIR }}
tar -xzf openvino_package.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_package.tar.gz || exit 1
pushd ${INSTALL_DIR}
tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR} && rm openvino_package.tar.gz || exit 1
popd
pushd ${{ env.INSTALL_TEST_DIR }}
tar -xzf openvino_tests.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_tests.tar.gz || exit 1
pushd ${INSTALL_TEST_DIR}
tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} && rm openvino_tests.tar.gz || exit 1
popd
- name: Install OpenVINO Python wheels
run: |
python3 -m pip install openvino --find-links=${{ env.INSTALL_DIR }}/tools
run: python3 -m pip install ${INSTALL_DIR}/tools/openvino-*

- name: Install TF Hub tests requirements
run: |
python3 -m pip install -r ${{ env.MODEL_HUB_TESTS_INSTALL_DIR }}/tf_hub_tests/requirements.txt
python3 -m pip install -r ${MODEL_HUB_TESTS_INSTALL_DIR}/tf_hub_tests/requirements.txt
- name: TensorFlow Hub Tests - TF FE
run: |
export PYTHONPATH=${{ env.MODEL_HUB_TESTS_INSTALL_DIR }}:$PYTHONPATH
python3 -m pytest ${{ env.MODEL_HUB_TESTS_INSTALL_DIR }}/tf_hub_tests/ -m ${{ env.TYPE }} --html=${{ env.INSTALL_TEST_DIR }}/TEST-tf_hub_tf_fe.html --self-contained-html
export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/tf_hub_tests/ -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-tf_hub_tf_fe.html --self-contained-html -v
env:
TYPE: ${{ github.event_name == 'schedule' && 'nightly' || 'precommit'}}
TEST_DEVICE: CPU
Expand Down
Loading

0 comments on commit ccbe497

Please sign in to comment.