Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[GHA] [CI] Enable L0 Windows build (#36159)

Gracjan Koscinskie417633244db
diff --git a/.github/actions/common/constants.py b/.github/actions/common/constants.py
index 9c544c1a221..ccacc805945 100644
--- a/.github/actions/common/constants.py
+++ b/.github/actions/common/constants.py
@@ -21,6 +21,7 @@ productTypes = (
'public_windows_vs2019_release',
'public_windows_vs2019_debug',
'public_windows_vs2022_release',
+ 'public_windows_vs2022_levelzero_release',
'public_windows_vs2022_debug',
'public_manylinux_2_28_x86_64_release',
'public_macos_x86_64_release',
diff --git a/.github/workflows/job_build_windows.yml b/.github/workflows/job_build_windows.yml
index f43e0b09d0e..1a3ffcc897c 100644
--- a/.github/workflows/job_build_windows.yml
+++ b/.github/workflows/job_build_windows.yml
@@ -26,6 +26,11 @@ on:
type: boolean
required: false
default: false
+ build-variant:
+ description: 'Build variant including toolchain, e.g., "vs2022" or "vs2022_levelzero"'
+ type: string
+ required: false
+ default: 'vs2022'
permissions: read-all
@@ -45,7 +50,7 @@ jobs:
CMAKE_BUILD_TYPE: ${{ inputs.build-type }}
CMAKE_CXX_COMPILER_LAUNCHER: ${{ inputs.build-type != 'Debug' && 'ccache' || '' }}
CMAKE_C_COMPILER_LAUNCHER: ${{ inputs.build-type != 'Debug' && 'ccache' || '' }}
- CCACHE_REMOTE_DIR: C:\\mount\\caches\\ccache\\windows2022_x86_64_${{ inputs.build-type }}\\${{ inputs.target-branch }}
+ CCACHE_REMOTE_DIR: "C:\\mount\\caches\\ccache\\windows${{ inputs.build-variant }}_x86_64_${{ inputs.build-type }}\\${{ inputs.target-branch }}"
CCACHE_DIR: ${{ github.workspace }}\\ccache
CCACHE_MAXSIZE: 3G
CCACHE_SLOPPINESS: pch_defines,time_macros
@@ -60,7 +65,7 @@ jobs:
BUILD_DIR: "${{ github.workspace }}\\openvino_build"
ARTIFACTS_SHARE: "C:\\mount\\build-artifacts"
MANIFEST_PATH: "${{ github.workspace }}\\manifest.yml"
- PRODUCT_TYPE: 'public_windows_vs2022_${{ inputs.build-type }}'
+ PRODUCT_TYPE: "public_windows_${{ inputs.build-variant }}_${{ inputs.build-type }}"
steps:
- name: Clone OpenVINO
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
diff --git a/.github/workflows/windows_level_zero_build.yml b/.github/workflows/windows_level_zero_build.yml
new file mode 100644
index 00000000000..18d6d94660a
--- /dev/null
+++ b/.github/workflows/windows_level_zero_build.yml
@@ -0,0 +1,94 @@
+name: Windows Level Zero Build
+on:
+ workflow_dispatch:
+ inputs:
+ target-branch:
+ description: 'Target branch for the build; taken from event context by default'
+ type: string
+ required: false
+ pull_request:
+ types:
+ - opened
+ - synchronize
+ - reopened
+ - ready_for_review
+
+concurrency:
+ # github.ref is not unique in post-commit
+ group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-windows-l0-build
+ cancel-in-progress: true
+
+permissions: read-all
+
+env:
+ TARGET_BRANCH: ${{ inputs.target-branch || github.base_ref || github.event.merge_group.base_ref || github.ref }}
+
+jobs:
+ Smart_CI:
+ runs-on: ubuntu-latest
+ if: github.event.pull_request.draft == false || github.run_attempt > 1
+ outputs:
+ affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
+ skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
+ target_branch: ${{ steps.set_target_branch.outputs.target_branch }}
+ steps:
+ - name: checkout action
+ uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
+ timeout-minutes: 15
+ with:
+ sparse-checkout: .github/actions/smart-ci
+
+ - name: Get affected components
+ id: smart_ci
+ uses: ./.github/actions/smart-ci
+ with:
+ repository: ${{ github.repository }}
+ pr: ${{ github.event.number }}
+ commit_sha: ${{ github.sha }}
+ ref_name: ${{ github.ref_name }}
+ component_pattern: "category: (.*)"
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ skip_when_only_listed_labels_set: 'docs'
+ skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*,.github/workflows/ci-doctor.lock.yml'
+
+ - name: Get target branch
+ id: set_target_branch
+ run: |
+ echo "target_branch=${TARGET_BRANCH#refs/heads/}" >> $GITHUB_OUTPUT
+
+ Build:
+ needs: [ Smart_CI ]
+ if: "!needs.smart_ci.outputs.skip_workflow && fromJSON(needs.smart_ci.outputs.affected_components).GPU"
+ uses: ./.github/workflows/job_build_windows.yml
+ with:
+ runner: 'aks-win-16-cores-32gb-build'
+ affected-components: ${{ needs.smart_ci.outputs.affected_components }}
+ build-type: 'Release'
+ build-variant: 'vs2022_levelzero'
+ target-branch: ${{ needs.smart_ci.outputs.target_branch }}
+ build-additional-python-wheels: true
+ cmake-options: >-
+ -G 'Ninja Multi-Config'
+ -DENABLE_PYTHON=ON
+ -DENABLE_WHEEL=OFF
+ -DENABLE_TESTS=ON
+ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
+ -DENABLE_STRICT_DEPENDENCIES=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=ON
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
+ -DFETCHCONTENT_BASE_DIR="C:\fcc\ninja_multi_config"
+ -DGPU_RT_TYPE=L0
+
+ Overall_Status:
+ name: ci/gha_overall_status_windows_l0_build
+ needs: [ Smart_CI, Build ]
+ if: ${{ always() }}
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check status of all jobs
+ if: >-
+ ${{
+ contains(needs.*.result, 'failure') ||
+ contains(needs.*.result, 'cancelled')
+ }}
+ run: exit 1