1
- name : Linux MLIR
1
+ name : Linux MLIR Build
2
2
on :
3
3
workflow_call :
4
4
inputs :
10
10
description : ' Machine on which the builds will run'
11
11
type : string
12
12
required : true
13
- test-runner :
14
- description : ' Machine on which the tests will run '
13
+ openvino-organization :
14
+ description : ' OpenVINO fork owner to clone '
15
15
type : string
16
- required : false
16
+ required : true
17
+ openvino-commit :
18
+ description : ' OpenVINO commit to checkout'
19
+ type : string
20
+ required : true
17
21
openvino-cmake-options :
18
22
description : ' A string of options passed to OpenVINO CMake'
19
23
type : string
31
35
description : ' Cache package suffix'
32
36
type : string
33
37
required : false
34
- run -tests :
35
- description : ' Whether to run NPU Compiler tests '
38
+ with -tests :
39
+ description : ' Whether to build test targets '
36
40
type : boolean
37
41
required : false
38
42
default : false
39
- run-unit-tests :
40
- description : ' Whether to run NPU Compiler unit tests'
41
- type : boolean
42
- required : false
43
- default : true
44
- run-lit-tests :
45
- description : ' Whether to run NPU Compiler LIT tests'
46
- type : boolean
47
- required : false
48
- default : true
43
+ openvino-install-artifact :
44
+ description : ' OpenVINO/NPU build package name to be stored as the action artifact'
45
+ type : string
46
+ required : true
47
+ default : false
48
+
49
+ defaults :
50
+ run :
51
+ shell : bash
49
52
50
53
permissions : read-all
51
54
52
55
env :
53
56
OPENVINO_INSTALL_DIR : ./openvino_install
54
- OPENVINO_INSTALL_ARTIFACT_NAME : l_ov_dyn_${{ inputs.os }}_npu_${{ github.sha }}
55
57
56
58
jobs :
57
59
Cache :
58
60
name : Cache
59
61
if : ${{ inputs.build-cache }}
60
- runs-on : ${{ inputs.build-runner }}
62
+ runs-on : ubuntu-latest
61
63
outputs :
62
- hit : ${{ steps.restore.outputs.hit }}
63
- key : ${{ steps.key.outputs.key }}
64
+ cache- hit : ${{ steps.restore.outputs.cache- hit }}
65
+ cache- key : ${{ steps.key.outputs.cache_key }}
64
66
steps :
65
67
- name : Get cache key
66
68
id : key
67
69
run : |
68
- key ="l_ov_dyn_${{ inputs.os }}_cache_${{ inputs.build-cache-key-suffix || github.sha }}"
69
- echo "key=$key " >> $GITHUB_OUTPUT
70
+ cache_key ="l_ov_dyn_${{ inputs.os }}_cache_${{ inputs.build-cache-key-suffix || github.sha }}"
71
+ echo "cache_key=$cache_key " >> $GITHUB_OUTPUT
70
72
71
73
- name : Restore OpenVINO/NPU package from cache
72
74
id : restore
73
75
uses : actions/cache/restore@v4
74
76
with :
75
- key : ${{ steps.key.outputs.key }}
77
+ key : ${{ steps.key.outputs.cache_key }}
76
78
path : ${{ env.OPENVINO_INSTALL_DIR }}
77
79
78
80
- name : Upload artifacts
79
- if : ${{ steps.restore.outputs.hit }}
81
+ if : ${{ steps.restore.outputs.cache- hit }}
80
82
uses : actions/upload-artifact@v4
81
83
with :
82
84
path : ${{ env.OPENVINO_INSTALL_DIR }}
83
- name : ${{ env.OPENVINO_INSTALL_ARTIFACT_NAME }}
85
+ name : ${{ inputs.openvino-install-artifact }}
84
86
85
87
Build :
86
88
name : Build
87
89
needs : Cache
88
- if : needs.Cache.outputs.hit != 'true'
90
+ if : needs.Cache.outputs.cache- hit != 'true'
89
91
runs-on : ${{ inputs.build-runner }}
90
92
timeout-minutes : 240
91
- defaults :
92
- run :
93
- shell : bash
94
93
env :
95
94
DEBIAN_FRONTEND : noninteractive
96
95
CMAKE_BUILD_TYPE : ' Release'
@@ -99,32 +98,22 @@ jobs:
99
98
OPENVINO_BUILD_DIR : ./openvino_build
100
99
NPU_COMPILER_BUILD_DIR : ./npu_compiler_build
101
100
steps :
102
- - name : Clone NPU Compiler
101
+ - name : Clone OpenVINO
103
102
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
104
103
timeout-minutes : 15
105
104
with :
106
- path : ${{ env.NPU_COMPILER_REPO }}
105
+ repository : ${{ inputs.openvino-organization }}/openvino
106
+ path : ${{ env.OPENVINO_REPO }}
107
107
submodules : true
108
- lfs : true
108
+ ref : ${{ inputs.openvino-commit }}
109
109
110
- - name : Get integrated OpenVINO version
111
- id : read_openvino_sha
112
- run : |
113
- 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')
114
- 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')
115
- echo "github_org=$GITHUB_ORG"
116
- echo "commit_sha=$COMMIT_SHA"
117
- echo "github_org=$GITHUB_ORG" >> $GITHUB_OUTPUT
118
- echo "commit_sha=$COMMIT_SHA" >> $GITHUB_OUTPUT
119
-
120
- - name : Clone OpenVINO
110
+ - name : Clone NPU Compiler
121
111
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
122
112
timeout-minutes : 15
123
113
with :
124
- repository : ${{ steps.read_openvino_sha.outputs.github_org }}/openvino
125
- path : ${{ env.OPENVINO_REPO }}
114
+ path : ${{ env.NPU_COMPILER_REPO }}
126
115
submodules : true
127
- ref : ${{ steps.read_openvino_sha.outputs.commit_sha }}
116
+ lfs : true
128
117
129
118
- name : System info
130
119
uses : openvinotoolkit/openvino/.github/actions/system_info@master
@@ -139,7 +128,7 @@ jobs:
139
128
140
129
- name : Prepare environment
141
130
run : |
142
- if [[ "${{ inputs.run -tests }}" == "true" ]]; then
131
+ if [[ "${{ inputs.with -tests }}" == "true" ]]; then
143
132
echo "ENABLE_TESTS_FLAG=ON" >> $GITHUB_ENV
144
133
else
145
134
echo "ENABLE_TESTS_FLAG=OFF" >> $GITHUB_ENV
@@ -222,51 +211,11 @@ jobs:
222
211
uses : actions/cache/save@v4
223
212
with :
224
213
path : ${{ env.OPENVINO_INSTALL_DIR }}
225
- key : ${{ needs.Cache.outputs.key }}
214
+ key : ${{ needs.Cache.outputs.cache- key }}
226
215
227
216
- name : Upload artifacts
228
217
id : save_artifact
229
218
uses : actions/upload-artifact@v4
230
219
with :
231
220
path : ${{ env.OPENVINO_INSTALL_DIR }}
232
- name : ${{ env.OPENVINO_INSTALL_ARTIFACT_NAME }}
233
-
234
- Test :
235
- name : Unit Tests
236
- needs : [Cache, Build]
237
- if : |
238
- inputs.run-tests &&
239
- (needs.Cache.result == 'skipped' || needs.Cache.result == 'success') &&
240
- (needs.Build.result == 'skipped' || needs.Build.result == 'success')
241
- runs-on : ${{ inputs.test-runner }}
242
- timeout-minutes : 240
243
- defaults :
244
- run :
245
- shell : bash
246
- steps :
247
- - name : Download artifacts
248
- uses : actions/download-artifact@v4
249
- with :
250
- name : ${{ env.OPENVINO_INSTALL_ARTIFACT_NAME }}
251
- path : ${{ env.OPENVINO_INSTALL_DIR }}
252
-
253
- - name : Run OV NPU Unit tests
254
- if : ${{ inputs.run-unit-tests }}
255
- run : |
256
- ${OPENVINO_INSTALL_DIR}/tests/ov_npu_unit_tests
257
-
258
- - name : Run NPU Unit tests
259
- if : ${{ inputs.run-unit-tests }}
260
- run : |
261
- ${OPENVINO_INSTALL_DIR}/tests/npuUnitTests
262
-
263
- - name : Run NPU LIT tests
264
- if : ${{ inputs.run-lit-tests }}
265
- run : |
266
- export PATH=$PATH:${OPENVINO_INSTALL_DIR}/tools/prof_parser
267
- export PATH=$PATH:${OPENVINO_INSTALL_DIR}/tools/npu-loader
268
- export PATH=$PATH:${OPENVINO_INSTALL_DIR}/tools/npu-lsp-server
269
- export PATH=$PATH:${OPENVINO_INSTALL_DIR}/tools/vpux-opt
270
- export PATH=$PATH:${OPENVINO_INSTALL_DIR}/tools/vpux-translate
271
- python3 ${OPENVINO_INSTALL_DIR}/tests/lit-tests/lit-tool/lit.py -v --param arch=NPU37XX NPU/NPU
272
- python3 ${OPENVINO_INSTALL_DIR}/tests/lit-tests/lit-tool/lit.py -v --param arch=NPU40XX NPU/NPU
221
+ name : ${{ inputs.openvino-install-artifact }}
0 commit comments