-
Notifications
You must be signed in to change notification settings - Fork 819
304 lines (282 loc) · 12 KB
/
sycl-linux-precommit.yml
File metadata and controls
304 lines (282 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
name: SYCL Pre Commit on Linux
on:
# We rely on "Fork pull request workflows from outside collaborators" -
# "Require approval for all outside collaborators" at
# https://github.com/intel/llvm/settings/actions for security.
pull_request:
branches:
- sycl
- sycl-rel-**
# Do not run builds if changes are only in the following locations
# Note: benchmark-related paths are the same as in sycl-ur-perf-benchmarking.yml (to run there instead)
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.github/CODEOWNERS'
- 'sycl/cts_exclude_filter/**'
- 'sycl/doc/**'
- 'sycl/gdb/**'
- 'clang/docs/**'
- '**.md'
- '**.rst'
- '.github/workflows/sycl-windows-*.yml'
- '.github/workflows/sycl-macos-*.yml'
- '.github/workflows/sycl-nightly.yml'
- '.github/workflows/sycl-rel-nightly.yml'
- '.github/workflows/sycl-rel-nightly-launch.yml'
- '.github/workflows/sycl-trivy.yml'
- '.github/workflows/sycl-coverity.yml'
- '.github/workflows/sycl-weekly.yml'
- 'devops/containers/**'
- 'devops/actions/build_container/**'
- 'unified-runtime/examples/**'
- 'unified-runtime/scripts/**'
- 'unified-runtime/test/**'
- 'unified-runtime/third_party/**'
- 'unified-runtime/tools/**'
- 'devops/scripts/benchmarks/**'
- 'devops/actions/run-tests/benchmark/**'
- '.github/workflows/sycl-ur-perf-benchmarking.yml'
concurrency:
# Cancel a currently running workflow from the same PR, branch or tag.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
detect_changes:
uses: ./.github/workflows/sycl-detect-changes.yml
build:
name: Self build
needs: [detect_changes]
uses: ./.github/workflows/sycl-linux-build.yml
with:
build_ref: ${{ github.sha }}
build_cache_root: "/__w/"
build_cache_suffix: "default"
# Docker image has last nightly pre-installed and added to the PATH
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
cc: clang
cxx: clang++
changes: ${{ needs.detect_changes.outputs.filters }}
toolchain_artifact: sycl_linux_default
e2e_binaries_artifact: e2e_bin
e2e_binaries_preview_artifact: e2e_bin_preview
e2e_binaries_new_offload_model_artifact: e2e_bin_new_offload_model
# Build and run native cpu e2e tests separately as cannot currently
# build all the e2e tests
build_run_native_cpu_e2e_tests:
if: ${{ !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
runs-on: [Linux, build]
needs: [build]
container:
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
options: -u 1001:1001
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: |
devops/
# download build artefact
- name: Download toolchain
uses: actions/download-artifact@v7
with:
name: sycl_linux_default
- name: Extract SYCL toolchain
shell: bash
run: |
mkdir toolchain
tar -xf llvm_sycl.tar.zst -C toolchain
rm llvm_sycl.tar.zst
- name: Build and run E2E tests
uses: ./devops/actions/run-tests/linux/e2e
with:
ref: ${{ github.ref || github.sha }}
testing_mode: full
target_devices: native_cpu:cpu
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
extra_lit_opts: --param sycl_build_targets="native_cpu"
extra_cmake_args: -DSYCL_TEST_E2E_TARGETS="native_cpu:cpu" -DSYCL_TEST_E2E_STANDALONE=ON
# If a PR changes CUDA adapter, run the build on Ubuntu 22.04 as well.
# Ubuntu 22.04 container has CUDA 12.1 installed while Ubuntu 24.0 image
# has CUDA 12.6.1 installed.
# The idea is to ensure that the code works with both CUDA versions.
build_ubuntu2204:
needs: [detect_changes]
if: ${{ !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur_cuda_adapter') }}
uses: ./.github/workflows/sycl-linux-build.yml
with:
build_ref: ${{ github.sha }}
build_cache_root: "/__w/"
build_cache_suffix: "ubuntu22"
build_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"
changes: ${{ needs.detect_changes.outputs.filters }}
toolchain_artifact: sycl_linux_ubuntu22
compat_read_exclude:
name: Read compatibility testing exclude list
runs-on: [Linux, aux-tasks]
outputs:
FILTER_6_2: ${{ steps.result.outputs.FILTER_6_2 }}
FILTER_6_3: ${{ steps.result.outputs.FILTER_6_3 }}
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: |
devops/
- name: Register cleanup after job is finished
uses: ./devops/actions/cleanup
- id: result
shell: bash
run: |
# Transform to format expected by `llvm-lit --filter-out "pattern1|pattern2|..."`.
# First, remove comments/empty lines, then join lines with "|" as separator.
echo FILTER_6_2="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_2 | paste -sd '|')" >> $GITHUB_OUTPUT
echo FILTER_6_3="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_3 | paste -sd '|')" >> $GITHUB_OUTPUT
E2E:
needs: [build, detect_changes, compat_read_exclude]
if: ${{ !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
permissions:
contents: write
packages: read
strategy:
fail-fast: false
matrix:
include:
- name: Intel / GEN 12 Integrated
runner: '["Linux", "gen12"]'
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
- name: NVIDIA/CUDA
runner: '["Linux", "cuda"]'
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN
target_devices: cuda:gpu
- name: Intel / Arc A-Series Graphics
runner: '["Linux", "arc"]'
target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu
env: '{"LIT_FILTER":"Matrix/"}'
- name: Intel / Ponte Vecchio GPU
runner: '["Linux", "pvc"]'
target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu
- name: Intel / Battlemage Graphics
runner: '["Linux", "bmg"]'
target_devices: level_zero_v1:gpu;level_zero_v2:gpu
- name: Preview Mode
runner: '["Linux", "gen12"]'
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
extra_lit_opts: --param test-preview-mode=True
binaries_artifact: e2e_bin_preview
- name: Intel / ARL with L0 v2
runner: '["Linux", "arl"]'
target_devices: level_zero_v2:arch-intel_gpu_mtl_u
extra_lit_opts: --param test-preview-mode=True
# We're in an ABI-breaking window, so these don't make sense for now.
- name: ABI compatibility / sycl-rel-6_2
runner: '["Linux", "pvc"]'
image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2
target_devices: level_zero:gpu
extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER_6_2 }}"'
binaries_artifact: 'in-container'
skip_run: true
- name: ABI compatibility / sycl-rel-6_3
runner: '["Linux", "pvc"]'
image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_3
target_devices: level_zero:gpu
extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER_6_3 }}"'
binaries_artifact: 'in-container'
skip_run: true
uses: ./.github/workflows/sycl-linux-run-tests.yml
with:
name: ${{ matrix.name }}
runner: ${{ matrix.runner }}
image: ${{ matrix.image }}
image_options: ${{ matrix.image_options || '-u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN' }}
target_devices: ${{ matrix.target_devices }}
extra_lit_opts: ${{ matrix.extra_lit_opts }}
repo_ref: ${{ github.sha }}
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}
binaries_artifact: ${{ matrix.binaries_artifact || 'e2e_bin' }}
testing_mode: 'run-only'
# Do not install drivers on AMD and CUDA runners.
install_igc_driver: >-
${{ !contains(matrix.target_devices, 'cuda') &&
!contains(matrix.target_devices, 'hip') &&
contains(needs.detect_changes.outputs.filters, 'drivers') }}
skip_run: ${{ matrix.skip_run || 'false' }}
env: ${{ matrix.env || (contains(needs.detect_changes.outputs.filters, 'esimd') && '{}' || '{"LIT_FILTER_OUT":"ESIMD/"}') }}
E2E-with-new-offload-model:
needs: [build]
if: |
!cancelled() &&
needs.build.outputs.build_conclusion == 'success' &&
contains(github.event.pull_request.labels.*.name, 'new-offload-model')
permissions:
contents: write
packages: read
strategy:
fail-fast: false
matrix:
include:
- name: Intel / GEN 12 Integrated
runner: '["Linux", "gen12"]'
target_devices: opencl:cpu;opencl:gpu
- name: Intel / Arc A-Series Graphics
runner: '["Linux", "arc"]'
target_devices: level_zero:gpu
- name: Intel / Ponte Vecchio GPU
runner: '["Linux", "pvc"]'
target_devices: level_zero:gpu
- name: Intel / Battlemage Graphics
runner: '["Linux", "bmg"]'
target_devices: level_zero_v2:gpu
- name: NVIDIA/CUDA
runner: '["Linux", "cuda"]'
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN
target_devices: cuda:gpu
uses: ./.github/workflows/sycl-linux-run-tests.yml
with:
name: ${{ matrix.name }} with NewOffloadModel
runner: ${{ matrix.runner }}
image: ${{ matrix.image }}
image_options: ${{ matrix.image_options || '-u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN' }}
target_devices: ${{ matrix.target_devices }}
extra_lit_opts: ${{ matrix.extra_lit_opts }} --param enable_new_offload_model=True
repo_ref: ${{ github.sha }}
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}
binaries_artifact: 'e2e_bin_new_offload_model'
testing_mode: 'run-only'
test-perf:
needs: [build, detect_changes]
permissions:
contents: write
packages: read
if: |
!cancelled()
&& needs.build.outputs.build_conclusion == 'success'
&& (contains(github.event.pull_request.labels.*.name, 'run-perf-tests')
|| contains(needs.detect_changes.outputs.filters, 'perf-tests'))
strategy:
fail-fast: false
matrix:
include:
- name: Intel GEN12 Graphics system
runner: '["Linux", "gen12"]'
image_extra_opts: --device=/dev/dri
- name: Intel Arc A-Series Graphics system
runner: '["Linux", "arc"]'
image_extra_opts: --device=/dev/dri
- name: CUDA system
runner: '["Linux", "cuda"]'
image_extra_opts: --gpus all
uses: ./.github/workflows/sycl-linux-run-tests.yml
with:
name: Perf tests on ${{ matrix.name }}
runner: ${{ matrix. runner }}
image_options: -u 1001 --privileged --cap-add SYS_ADMIN ${{ matrix.image_extra_opts }}
target_devices: all
env: '{"LIT_FILTER":"PerformanceTests/"}'
extra_lit_opts: -a -j 1 --param enable-perf-tests=True
repo_ref: ${{ github.sha }}
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}