Skip to content

Commit

Permalink
Merge branch 'master' into ilya-lavrenov-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov authored Dec 6, 2024
2 parents c3ab428 + ea72f30 commit 49ddd22
Show file tree
Hide file tree
Showing 997 changed files with 27,382 additions and 24,857 deletions.
6 changes: 3 additions & 3 deletions .github/actions/cache/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions .github/actions/install_ov_wheels/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: 'Find and install OpenVINO Python wheels'
description: 'Finds the OpenVINO Python wheels suitable for the "python3" executable and installs them'
inputs:
wheels-dir-path:
description: 'Path to the directory in which wheels are located'
required: true
wheels-to-install:
description: 'List of wheel names to install in the form of "openvino openvino_tokenizers"'
runs:
using: 'composite'
steps:
- name: Install OpenVINO Python wheels (Windows)
shell: pwsh
if: runner.os == 'Windows'
run: |
# Get the Python version
$pyVersion = python3 -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')"
foreach ($wheel in $("${{ inputs.wheels-to-install }}" -split ' ')) {
# Search for the python-specific wheel version and install it if exists
$wheelPath = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter "$wheel-*cp$pyVersion*.whl" | Select-Object -First 1
if ($wheelPath) {
python3 -m pip install $wheelPath.FullName
} else {
# If the python-specific version does not exist, install by name only
$wheelPathByName = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter "$wheel-*.whl" | Select-Object -First 1
python3 -m pip install $wheelPathByName.FullName
}
}
- name: Install OpenVINO Python wheels (Linux and macOS)
shell: bash
if: runner.os != 'Windows'
run: |
py_version=$(python3 -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")
for wheel in ${{ inputs.wheels-to-install }}; do
echo "Installing the ${wheel} wheel"
# Search for the python-specific wheel version and install it if exists
wheel_path=$(find ${{ inputs.wheels-dir-path }} -name "$wheel-*cp$py_version*.whl")
echo "Wheel path: ${wheel_path}"
if [ -n "${wheel_path}" ]; then
python3 -m pip install $wheel_path
else
# If the python-specific version does not exist, install by name only
python3 -m pip install ${{ inputs.wheels-dir-path }}/$wheel-*.whl
fi
done
4 changes: 2 additions & 2 deletions .github/actions/openvino_provider/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ runs:
else
ov_package_url=$(curl -s ${{ inputs.nightly_package_source }} | jq -r '.${{ inputs.platform }}_${{ inputs.arch }}')
fi
cd ${{ inputs.install_dir || env.GITHUB_WORKSPACE }}
cd ${{ inputs.install_dir || github.workspace }}
package_basename=$(basename $ov_package_url)
wget $ov_package_url --progress=bar:force:noscroll -O $package_basename
package_folder=${package_basename%.*}
Expand All @@ -196,7 +196,7 @@ runs:
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: ${{ steps.openvino_s3_download.outputs.ov_artifact_name }}
path: ${{ steps.openvino_s3_download.outputs.ov_package_path }}
path: ${{ github.workspace }}/${{ steps.openvino_s3_download.outputs.ov_package_path }}
if-no-files-found: 'error'

- name: Get wheel
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/debian_10_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
Docker:
needs: Smart_CI
if: "!needs.smart_ci.outputs.skip_workflow"
runs-on: aks-linux-16-cores-arm-docker-build
runs-on: aks-linux-4-cores-8gb-arm-docker-build
container:
image: openvinogithubactions.azurecr.io/docker_build:0.2
volumes:
Expand All @@ -75,7 +75,7 @@ jobs:
if: "!needs.smart_ci.outputs.skip_workflow"
uses: ./.github/workflows/job_build_linux.yml
with:
runner: 'aks-linux-16-cores-arm'
runner: 'aks-linux-16-cores-32gb-arm'
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_build.debian_10_arm }}", "volumes": ["/mount:/mount"], "options": "-e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING"}'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
event-name: ${{ github.event_name }}
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
needs: [ Docker, Build, Smart_CI ]
uses: ./.github/workflows/job_cxx_unit_tests.yml
with:
runner: 'aks-linux-16-cores-arm'
runner: 'aks-linux-8-cores-16gb-arm'
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.debian_10_arm }}
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
os: 'debian_10'
Expand All @@ -116,6 +116,8 @@ jobs:
needs: [ Docker, Build, Smart_CI ]
uses: ./.github/workflows/job_cpu_functional_tests.yml
with:
# Additional investigation needed why CPU functional tests are failing on v6 VM size's version,
# so leave it as it is for now
runner: 'aks-linux-16-cores-arm'
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.debian_10_arm }}
python-version: '3.7'
Expand Down
58 changes: 55 additions & 3 deletions .github/workflows/job_build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ on:
description: 'A string of options passed to CMake'
type: string
required: true
build-additional-python-wheels:
description: 'Whether to build additional, i.e., non-system Python wheels. Should have Python 3.9-3.12 installed'
type: boolean
required: false
default: false

permissions: read-all

Expand Down Expand Up @@ -157,8 +162,7 @@ jobs:
run: echo SSL_CERT_FILE=$(python3 -m certifi) >> $env:GITHUB_ENV

- name: CMake configure
run: |
cmake -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }} ${{ inputs.cmake-options }}
run: cmake -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }} ${{ inputs.cmake-options }}

- name: Clean ccache stats
run: '& ccache --zero-stats'
Expand All @@ -176,6 +180,54 @@ jobs:
cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_TEST_DIR }} --component tests
working-directory: ${{ env.BUILD_DIR }}

# Setup additional Python versions for wheels building
- name: Setup Python 3.9
if: ${{ inputs.build-additional-python-wheels }}
uses: ./openvino/.github/actions/setup_python
with:
version: '3.9'
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'true'
self-hosted-runner: 'true'

# Setup additional Python versions for wheels building
- name: Setup Python 3.10
if: ${{ inputs.build-additional-python-wheels }}
uses: ./openvino/.github/actions/setup_python
with:
version: '3.10'
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'true'
self-hosted-runner: 'true'

# Setup additional Python versions for wheels building
- name: Setup Python 3.12
if: ${{ inputs.build-additional-python-wheels }}
uses: ./openvino/.github/actions/setup_python
with:
version: '3.12'
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'true'
self-hosted-runner: 'true'

- name: Build additional Python wheels
if: ${{ inputs.build-additional-python-wheels }}
run: |
$pyVersions = '3.9', '3.10', '3.12'
foreach ($pyVersion in $pyVersions) {
$pyBuildDir = "${{ github.workspace }}/py$pyVersion"
New-Item -ItemType Directory -Path "$pyBuildDir" -Force
$pythonCommand = "py -$pyVersion -c `"import sys; print(f'{sys.executable}')`""
$pythonExecutablePath = & cmd /c $pythonCommand
& $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir"
cmake --build "$pyBuildDir" --parallel --config ${{ env.CMAKE_BUILD_TYPE }}
cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels
}
- name: Pack Artifacts
run: |
$file = Get-ChildItem -Path "${{ env.INSTALL_DIR }}"
Expand Down Expand Up @@ -220,7 +272,7 @@ jobs:
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: openvino_wheels
path: ${{ env.BUILD_DIR }}/wheels/*.whl
path: ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl
if-no-files-found: 'error'

- name: Upload openvino tests package
Expand Down
23 changes: 8 additions & 15 deletions .github/workflows/job_pytorch_layer_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
echo "OPENVINO_REPO=$GITHUB_WORKSPACE/openvino" >> "$GITHUB_ENV"
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"
echo "INSTALL_WHEELS_DIR=$GITHUB_WORKSPACE/install/wheels" >> "$GITHUB_ENV"
echo "LAYER_TESTS_INSTALL_DIR=$GITHUB_WORKSPACE/install/tests/layer_tests" >> "$GITHUB_ENV"
- name: Install OpenVINO dependencies (mac)
Expand All @@ -83,11 +84,12 @@ jobs:
Expand-Archive openvino_tests.zip -DestinationPath ${{ env.INSTALL_DIR }}
working-directory: ${{ env.INSTALL_DIR }}

- name: Fetch setup_python action
- name: Fetch setup_python and install wheels actions
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout: |
.github/actions/setup_python/action.yml
.github/actions/install_ov_wheels/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'

Expand All @@ -99,20 +101,11 @@ jobs:
should-setup-pip-paths: ${{ runner.os != 'macOS' }}
self-hosted-runner: ${{ runner.os != 'macOS' }}

- name: Install OpenVINO Python wheels (Linux and macOS)
if: runner.os != 'Windows'
run: |
# Install the core OV wheel
python3 -m pip install ./openvino-*.whl
working-directory: ${{ env.INSTALL_WHEELS_DIR }}

- name: Install OpenVINO Python wheels (Windows)
if: runner.os == 'Windows'
run: |
# Find and install the core OV wheel
$ovCoreWheelPath=Get-ChildItem -Path . -Filter openvino-*.whl | % { $_.FullName }
python3 -m pip install "$ovCoreWheelPath"
working-directory: ${{ env.INSTALL_WHEELS_DIR }}
- name: Install OpenVINO Python wheels
uses: ./openvino/.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
wheels-to-install: 'openvino'

- name: Install Pytorch Layer tests dependencies
run: |
Expand Down
30 changes: 8 additions & 22 deletions .github/workflows/job_tensorflow_layer_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"
echo "LAYER_TESTS_INSTALL_DIR=$GITHUB_WORKSPACE/install/tests/layer_tests" >> "$GITHUB_ENV"
echo "INSTALL_WHEELS_DIR=$GITHUB_WORKSPACE/install/wheels" >> "$GITHUB_ENV"
- name: Install OpenVINO dependencies (mac)
if: runner.os == 'macOS'
Expand All @@ -83,11 +84,12 @@ jobs:
Expand-Archive openvino_tests.zip -DestinationPath ${{ env.INSTALL_DIR }}
working-directory: ${{ env.INSTALL_DIR }}

- name: Fetch setup_python action
- name: Fetch setup_python and install wheels actions
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout: |
.github/actions/setup_python/action.yml
.github/actions/install_ov_wheels/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'

Expand All @@ -99,27 +101,11 @@ jobs:
should-setup-pip-paths: ${{ runner.os != 'macOS' }}
self-hosted-runner: ${{ runner.os != 'macOS' }}

- name: Install OpenVINO Python wheels (Linux and macOS)
if: runner.os != 'Windows'
run: |
# Install the core OV wheel
python3 -m pip install ./openvino-*.whl
# Install the core OV Tokenizers wheel
python3 -m pip install ./openvino_tokenizers-*.whl
working-directory: ${{ env.INSTALL_WHEELS_DIR }}

- name: Install OpenVINO Python wheels (Windows)
if: runner.os == 'Windows'
run: |
# Find and install the core OV wheel
$ovCoreWheelPath=Get-ChildItem -Path . -Filter openvino-*.whl | % { $_.FullName }
python3 -m pip install "$ovCoreWheelPath"
# Find and install the core OV Tokenizers wheel
$ovCoreWheelPath=Get-ChildItem -Path . -Filter openvino_tokenizers-*.whl | % { $_.FullName }
python3 -m pip install "$ovCoreWheelPath"
working-directory: ${{ env.INSTALL_WHEELS_DIR }}
- name: Install OpenVINO Python wheels
uses: ./openvino/.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
wheels-to-install: 'openvino openvino_tokenizers'

- name: Install Python Layer tests dependencies
run: |
Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/job_tokenizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ jobs:
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "OPENVINO_TOKENIZERS_REPO=$GITHUB_WORKSPACE/openvino_tokenizers" >> "$GITHUB_ENV"
echo "EXTENSION_BUILD_DIR=$GITHUB_WORKSPACE/build" >> "$GITHUB_ENV"
echo "INSTALL_WHEELS_DIR=$GITHUB_WORKSPACE/install/wheels" >> "$GITHUB_ENV"
- name: checkout action
- name: checkout actions
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout: |
.github/actions/setup_python
.github/actions/cache
.github/actions/install_ov_wheels/action.yml
install_build_dependencies.sh
- name: Install OpenVINO dependencies (mac)
Expand Down Expand Up @@ -93,22 +95,11 @@ jobs:
# Dependencies
#

- name: Install OpenVINO Python wheel (Linux and macOS)
if: runner.os != 'Windows'
run: |
# Find and install wheel
wheel_name=$(find . -name 'openvino-*.whl')
python3 -m pip install $wheel_name
working-directory: ${{ env.INSTALL_WHEELS_DIR }}


- name: Install OpenVINO Python wheel (Windows)
if: runner.os == 'Windows'
run: |
# Find and install wheel
$ovCoreWheelPath=Get-ChildItem -Path . -Filter openvino-*.whl | % { $_.FullName }
python3 -m pip install "$ovCoreWheelPath"
working-directory: ${{ env.INSTALL_WHEELS_DIR }}
- name: Install OpenVINO Python wheels
uses: ./.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
wheels-to-install: 'openvino'

#
# Build
Expand Down
Loading

0 comments on commit 49ddd22

Please sign in to comment.