Skip to content

Commit c83524d

Browse files
committed
Add Driver build
1 parent ea47b47 commit c83524d

File tree

5 files changed

+186
-37
lines changed

5 files changed

+186
-37
lines changed

.github/workflows/job_build_mlir_linux.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
description: 'Machine on which the builds will run'
1111
type: string
1212
required: true
13-
openvino-organization:
13+
openvino-repository:
1414
description: 'OpenVINO fork owner to clone'
1515
type: string
1616
required: true
@@ -102,7 +102,7 @@ jobs:
102102
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
103103
timeout-minutes: 15
104104
with:
105-
repository: ${{ inputs.openvino-organization }}/openvino
105+
repository: ${{ inputs.openvino-repository }}
106106
path: ${{ env.OPENVINO_REPO }}
107107
submodules: true
108108
ref: ${{ inputs.openvino-commit }}
@@ -170,11 +170,11 @@ jobs:
170170
-S ${OPENVINO_REPO} \
171171
-B ${OPENVINO_BUILD_DIR}
172172
173-
- name: Cmake build - OpenVINO
173+
- name: CMake build - OpenVINO
174174
run: |
175175
cmake --build ${OPENVINO_BUILD_DIR} --parallel $(nproc) --config ${{ env.CMAKE_BUILD_TYPE }}
176176
177-
- name: Cmake install - OpenVINO
177+
- name: CMake install - OpenVINO
178178
run: |
179179
cmake --install ${OPENVINO_BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${OPENVINO_INSTALL_DIR}
180180
cmake --install ${OPENVINO_BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${OPENVINO_INSTALL_DIR} --component python_wheels
@@ -197,11 +197,11 @@ jobs:
197197
-S ${NPU_COMPILER_REPO} \
198198
-B ${NPU_COMPILER_BUILD_DIR}
199199
200-
- name: Cmake build - NPU Compiler
200+
- name: CMake build - NPU Compiler
201201
run: |
202202
cmake --build ${NPU_COMPILER_BUILD_DIR} --parallel $(nproc) --config ${{ env.CMAKE_BUILD_TYPE }}
203203
204-
- name: Cmake install - NPU Compiler
204+
- name: CMake install - NPU Compiler
205205
run: |
206206
cmake --install ${NPU_COMPILER_BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${OPENVINO_INSTALL_DIR}
207207
cmake --install ${NPU_COMPILER_BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${OPENVINO_INSTALL_DIR} --component tests
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: Linux DRIVER
2+
on:
3+
workflow_call:
4+
inputs:
5+
os:
6+
description: 'OS that is used for building in the form of "ubuntu_20_04"'
7+
type: string
8+
required: true
9+
build-runner:
10+
description: 'Machine on which the builds will run'
11+
type: string
12+
required: true
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
permissions: read-all
19+
20+
jobs:
21+
Dependencies:
22+
name: Dependencies
23+
runs-on: ubuntu-latest
24+
outputs:
25+
openvino_repo: ${{ steps.read_openvino_sha.outputs.ov_repo }}
26+
openvino_sha: ${{ steps.read_openvino_sha.outputs.ov_sha }}
27+
npu_repo: ${{ steps.get_npu_sha.outputs.npu_repo }}
28+
npu_sha: ${{ steps.get_npu_sha.outputs.npu_sha }}
29+
npu_tag: ${{ steps.create_npu_tag.outputs.npu_tag }}
30+
artifact-name: ${{ steps.artifacts.outputs.name }}
31+
env:
32+
NPU_COMPILER_REPO: ./npu_compiler
33+
steps:
34+
- name: Fetch OpenVINO config from NPU Compiler repo
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
timeout-minutes: 15
37+
with:
38+
sparse-checkout: |
39+
validation/openvino_config.json
40+
sparse-checkout-cone-mode: false
41+
path: ${{ env.NPU_COMPILER_REPO }}
42+
43+
- name: Get integrated OpenVINO version
44+
id: read_openvino_sha
45+
run: |
46+
OV_ORG=$(jq -r 'to_entries[0].key' ${NPU_COMPILER_REPO}/validation/openvino_config.json)
47+
OV_SHA=$(jq -r 'to_entries[0].value' ${NPU_COMPILER_REPO}/validation/openvino_config.json)
48+
echo "OpenVINO orgranization = $OV_ORG"
49+
echo "OpenVINO commit sha = $OV_SHA"
50+
echo "ov_repo=$OV_ORG/openvino" >> $GITHUB_OUTPUT
51+
echo "ov_sha=$OV_SHA" >> $GITHUB_OUTPUT
52+
53+
- name: Get NPU original fork and commit sha
54+
id: get_npu_sha
55+
run: |
56+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
57+
echo "npu_repo=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_OUTPUT
58+
echo "npu_sha=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
59+
else
60+
echo "npu_repo=${{ github.repository }}" >> $GITHUB_OUTPUT
61+
echo "npu_sha=${{ github.sha }}" >> $GITHUB_OUTPUT
62+
fi
63+
64+
- name: Create NPU Compiler tag
65+
id: create_npu_tag
66+
run: |
67+
NPU_TAG=ci_${GITHUB_SHA:0:7}
68+
echo "NPU Compiler tag to be used in NPU Driver Linux build : $NPU_TAG"
69+
echo "npu_tag=$NPU_TAG" >> $GITHUB_OUTPUT
70+
71+
- name: Configure artifacts
72+
id: artifacts
73+
run: |
74+
PKG_NAME=l_ov_cid_${{ inputs.os }}_npu_${{ github.sha }}
75+
echo "Package name : $PKG_NAME"
76+
echo "name=$PKG_NAME" >> $GITHUB_OUTPUT
77+
78+
Build:
79+
name: Build
80+
needs: Dependencies
81+
runs-on: ${{ inputs.build-runner }}
82+
timeout-minutes: 240
83+
env:
84+
DEBIAN_FRONTEND: noninteractive
85+
NPU_DRIVER_REPO: ./npu_driver
86+
NPU_DRIVER_BUILD_DIR: ./npu_driver_build
87+
NPU_DRIVER_INSTALL_DIR: ./npu_driver_install
88+
steps:
89+
- name: Clone Linux NPU Driver
90+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
91+
timeout-minutes: 15
92+
with:
93+
repository: intel/linux-npu-driver
94+
path: ${{ env.NPU_DRIVER_REPO }}
95+
submodules: true
96+
97+
- name: System info
98+
uses: openvinotoolkit/openvino/.github/actions/system_info@master
99+
100+
- name: Install system packages
101+
run: |
102+
sudo apt update
103+
sudo apt install -y build-essential git git-lfs cmake libudev-dev libboost-all-dev libssl-dev
104+
105+
- name: Configure OpenVINO and NPU Compiler versions
106+
run: |
107+
sed -i "s|^set(OPENVINO_REPOSITORY .*|set(OPENVINO_REPOSITORY https://github.com/${{ needs.Dependencies.outputs.openvino_repo }})|" ${NPU_DRIVER_REPO}/compiler/compiler_source.cmake
108+
sed -i '/GIT_REPOSITORY/{n;s|https://github.com/openvinotoolkit/npu_plugin.git|https://github.com/${{ needs.Dependencies.outputs.npu_repo }}.git|}' ${NPU_DRIVER_REPO}/compiler/compiler_source.cmake
109+
sed -i "s|^set(NPU_COMPILER_TAG .*|set(NPU_COMPILER_TAG ${{ needs.Dependencies.outputs.npu_tag }})|" ${NPU_DRIVER_REPO}/compiler/compiler_source.cmake
110+
sed -i "s|^set(NPU_COMPILER_REVISION .*|set(NPU_COMPILER_REVISION ${{ needs.Dependencies.outputs.npu_sha }})|" ${NPU_DRIVER_REPO}/compiler/compiler_source.cmake
111+
sed -i "s|^set(NPU_COMPILER_OPENVINO_REVISION .*|set(NPU_COMPILER_OPENVINO_REVISION ${{ needs.Dependencies.outputs.openvino_sha }})|" ${NPU_DRIVER_REPO}/compiler/compiler_source.cmake
112+
cat ${NPU_DRIVER_REPO}/compiler/compiler_source.cmake
113+
114+
- name: CMake configure - Linux NPU Driver
115+
run: |
116+
cmake \
117+
${{ inputs.driver-cmake-options }} \
118+
-DENABLE_NPU_COMPILER_BUILD=ON \
119+
-DCMAKE_INSTALL_PREFIX=$(realpath ${NPU_DRIVER_INSTALL_DIR}) \
120+
-S ${NPU_DRIVER_REPO} \
121+
-B ${NPU_DRIVER_BUILD_DIR}
122+
123+
- name: CMake build - Linux NPU Driver - deb packages
124+
run: |
125+
cmake \
126+
--build ${NPU_DRIVER_BUILD_DIR} \
127+
--parallel $(nproc) \
128+
--target package
129+
130+
- name: Copy packages
131+
run: |
132+
mkdir -p ${NPU_DRIVER_INSTALL_DIR}/packages
133+
mv ${NPU_DRIVER_BUILD_DIR}/intel-{level-zero-npu,fw-npu,driver-compiler-npu}*.*deb ${NPU_DRIVER_INSTALL_DIR}/packages/
134+
ls -a ${NPU_DRIVER_INSTALL_DIR}
135+
ls -a ${NPU_DRIVER_INSTALL_DIR}/packages

.github/workflows/job_mlir_linux.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ jobs:
6161
name: Dependencies
6262
runs-on: ubuntu-latest
6363
outputs:
64-
openvino_org: ${{ steps.read_openvino_sha.outputs.ov_org }}
64+
openvino_repo: ${{ steps.read_openvino_sha.outputs.ov_repo }}
6565
openvino_sha: ${{ steps.read_openvino_sha.outputs.ov_sha }}
66-
omz_org: ${{ steps.read_omz_sha.outputs.omz_org }}
66+
omz_repo: ${{ steps.read_omz_sha.outputs.omz_repo }}
6767
omz_sha: ${{ steps.read_omz_sha.outputs.omz_sha }}
6868
artifact-name: ${{ steps.artifacts.outputs.name }}
6969
env:
@@ -82,12 +82,12 @@ jobs:
8282
- name: Get integrated OpenVINO version
8383
id: read_openvino_sha
8484
run: |
85-
GITHUB_ORG=$(cat ${NPU_COMPILER_REPO}/validation/openvino_config.json | sed -En 's/.*"([A-Za-z0-9]+)"\s*:\s*"([a-f0-9]{40})".*/\1/p')
86-
COMMIT_SHA=$(cat ${NPU_COMPILER_REPO}/validation/openvino_config.json | sed -En 's/.*"([A-Za-z0-9]+)"\s*:\s*"([a-f0-9]{40})".*/\2/p')
87-
echo "OpenVINO orgranization = $GITHUB_ORG"
88-
echo "OpenVINO commit sha = $COMMIT_SHA"
89-
echo "ov_org=$GITHUB_ORG" >> $GITHUB_OUTPUT
90-
echo "ov_sha=$COMMIT_SHA" >> $GITHUB_OUTPUT
85+
OV_ORG=$(jq -r 'to_entries[0].key' ${NPU_COMPILER_REPO}/validation/openvino_config.json)
86+
OV_SHA=$(jq -r 'to_entries[0].value' ${NPU_COMPILER_REPO}/validation/openvino_config.json)
87+
echo "OpenVINO orgranization = $OV_ORG"
88+
echo "OpenVINO commit sha = $OV_SHA"
89+
echo "ov_repo=$OV_ORG/openvino" >> $GITHUB_OUTPUT
90+
echo "ov_sha=$OV_SHA" >> $GITHUB_OUTPUT
9191
9292
- name: Clone OpenVINO
9393
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -103,16 +103,19 @@ jobs:
103103
- name: Get integrated Open Model Zoo version
104104
id: read_omz_sha
105105
run: |
106-
GITHUB_ORG=$(cat ${OPENVINO_REPO}/src/plugins/intel_npu/tools/omz_version.json | sed -En 's/.*"([A-Za-z0-9]+)"\s*:\s*"([a-f0-9]{40})".*/\1/p')
107-
COMMIT_SHA=$(cat ${OPENVINO_REPO}/src/plugins/intel_npu/tools/omz_version.json | sed -En 's/.*"([A-Za-z0-9]+)"\s*:\s*"([a-f0-9]{40})".*/\2/p')
108-
echo "Open Model Zoo orgranization = $GITHUB_ORG"
109-
echo "Open Model Zoo commit sha = $COMMIT_SHA"
110-
echo "omz_org=$GITHUB_ORG" >> $GITHUB_OUTPUT
111-
echo "omz_sha=$COMMIT_SHA" >> $GITHUB_OUTPUT
106+
OMZ_ORG=$(jq -r 'to_entries[0].key' ${OPENVINO_REPO}/src/plugins/intel_npu/tools/omz_version.json)
107+
OMZ_SHA=$(jq -r 'to_entries[0].value' ${OPENVINO_REPO}/src/plugins/intel_npu/tools/omz_version.json)
108+
echo "Open Model Zoo orgranization = $OMZ_ORG"
109+
echo "Open Model Zoo commit sha = $OMZ_SHA"
110+
echo "omz_repo=$OMZ_ORG/open_model_zoo" >> $GITHUB_OUTPUT
111+
echo "omz_sha=$OMZ_SHA" >> $GITHUB_OUTPUT
112112
113113
- name: Configure artifacts
114114
id: artifacts
115-
run: echo "name=l_ov_dyn_${{ inputs.os }}_npu_${{ github.sha }}" >> $GITHUB_OUTPUT
115+
run: |
116+
PKG_NAME=l_l_ov_dyn_${{ inputs.os }}_npu_${{ github.sha }}
117+
echo "Package name : $PKG_NAME"
118+
echo "name=$PKG_NAME" >> $GITHUB_OUTPUT
116119
117120
Build:
118121
name: Build
@@ -121,7 +124,7 @@ jobs:
121124
with:
122125
os: ${{ inputs.os }}
123126
build-runner: ${{ inputs.build-runner }}
124-
openvino-organization: ${{ needs.Dependencies.outputs.openvino_org }}
127+
openvino-repository: ${{ needs.Dependencies.outputs.openvino_repo }}
125128
openvino-commit: ${{ needs.Dependencies.outputs.openvino_sha }}
126129
openvino-cmake-options: ${{ inputs.openvino-cmake-options }}
127130
npu-cmake-options: ${{ inputs.npu-cmake-options }}

.github/workflows/ubuntu_22.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Linux (Ubuntu 22.04)
2-
on:
3-
workflow_dispatch:
4-
pull_request:
5-
push:
6-
branches:
7-
- develop
2+
#on:
3+
# workflow_dispatch:
4+
# pull_request:
5+
# push:
6+
# branches:
7+
# - develop
88

99
concurrency:
10-
group: mlir-linux-${{ github.event_name }}-${{ github.ref_name }}-ubuntu-22
10+
group: linux-${{ github.event_name }}-${{ github.ref_name }}-ubuntu-22
1111
cancel-in-progress: true
1212

1313
permissions: read-all
@@ -23,3 +23,7 @@ jobs:
2323
run-unit-tests: true
2424
run-lit-tests: true
2525
run-compilation-tests: true
26+
27+
DRIVER:
28+
name: DRIVER
29+
uses: ./.github/workflows/job_driver_linux.yml

.github/workflows/ubuntu_24.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,26 @@ on:
77
- develop
88

99
concurrency:
10-
group: mlir-linux-${{ github.event_name }}-${{ github.ref_name }}-ubuntu-24
10+
group: linux-${{ github.event_name }}-${{ github.ref_name }}-ubuntu-24
1111
cancel-in-progress: true
1212

1313
permissions: read-all
1414

1515
jobs:
16-
MLIR:
17-
name: MLIR
18-
uses: ./.github/workflows/job_mlir_linux.yml
16+
#MLIR:
17+
# name: MLIR
18+
# uses: ./.github/workflows/job_mlir_linux.yml
19+
# with:
20+
# os: ubuntu_24_04
21+
# build-runner: ubuntu-latest-32-cores
22+
# test-runner: ubuntu-latest-8-cores
23+
# run-unit-tests: false
24+
# run-lit-tests: false
25+
# run-compilation-tests: true
26+
27+
DRIVER:
28+
name: DRIVER
29+
uses: ./.github/workflows/job_driver_linux.yml
1930
with:
2031
os: ubuntu_24_04
2132
build-runner: ubuntu-latest-32-cores
22-
test-runner: ubuntu-latest-8-cores
23-
run-unit-tests: false
24-
run-lit-tests: false
25-
run-compilation-tests: true

0 commit comments

Comments
 (0)