Skip to content

Commit ba918a6

Browse files
authored
[CI][SYCL] Enable E2E testing for New Offloading Model (#20634)
This patch has the following changes: * `--param enable_new_offload_model` is added to SYCL E2E LIT test configuration * NewOffloadModel mode run is added to sycl-linux-precommit * NewOffloadModel mode run is added to sycl-nightly for linux and windows.
1 parent e1ccc9c commit ba918a6

21 files changed

+176
-3
lines changed

.github/workflows/sycl-linux-build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ on:
7575
e2e_binaries_preview_artifact:
7676
type: string
7777
required: false
78+
e2e_binaries_new_offload_model_artifact:
79+
type: string
80+
required: false
7881

7982
outputs:
8083
build_conclusion:
@@ -339,6 +342,21 @@ jobs:
339342
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
340343
extra_lit_opts: --param sycl_build_targets="spir;nvidia;amd"
341344

345+
- name: Build E2E tests with NewOffloadModel
346+
if: |
347+
inputs.e2e_binaries_new_offload_model_artifact &&
348+
!cancelled()
349+
&& steps.build.conclusion == 'success' &&
350+
contains(github.event.pull_request.labels.*.name, 'new-offload-model')
351+
uses: ./devops/actions/run-tests/e2e
352+
with:
353+
ref: ${{ inputs.ref || github.sha }}
354+
testing_mode: build-only
355+
target_devices: all
356+
binaries_artifact: ${{ inputs.e2e_binaries_new_offload_model_artifact }}
357+
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
358+
extra_lit_opts: --param sycl_build_targets="spir;nvidia;amd" --param enable_new_offload_model=True
359+
342360
- name: Build E2E tests with SPIR-V Backend
343361
if: ${{ inputs.e2e_binaries_spirv_backend_artifact && !cancelled() && steps.build.conclusion == 'success' }}
344362
uses: ./devops/actions/run-tests/e2e

.github/workflows/sycl-linux-precommit.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
toolchain_artifact: sycl_linux_default
6767
e2e_binaries_artifact: e2e_bin
6868
e2e_binaries_preview_artifact: e2e_bin_preview
69+
e2e_binaries_new_offload_model_artifact: e2e_bin_new_offload_model
6970

7071
# Build and run native cpu e2e tests separately as cannot currently
7172
# build all the e2e tests
@@ -236,6 +237,57 @@ jobs:
236237
skip_run: ${{matrix.use_igc_dev && contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') || matrix.skip_run || 'false'}}
237238
env: ${{ matrix.env || (contains(needs.detect_changes.outputs.filters, 'esimd') && '{}' || '{"LIT_FILTER_OUT":"ESIMD/"}') }}
238239

240+
E2E-with-new-offload-model:
241+
needs: [build, detect_changes, compat_read_exclude]
242+
if: |
243+
!cancelled() &&
244+
needs.build.outputs.build_conclusion == 'success' &&
245+
contains(github.event.pull_request.labels.*.name, 'new-offload-model')
246+
permissions:
247+
contents: write
248+
packages: read
249+
strategy:
250+
fail-fast: false
251+
matrix:
252+
include:
253+
- name: Intel / GEN 12 Integrated
254+
runner: '["Linux", "gen12"]'
255+
target_devices: opencl:cpu;opencl:gpu
256+
- name: Intel / Arc A-Series Graphics
257+
runner: '["Linux", "arc"]'
258+
target_devices: level_zero:gpu
259+
- name: Intel / Ponte Vecchio GPU
260+
runner: '["Linux", "pvc"]'
261+
target_devices: level_zero:gpu
262+
- name: Intel / Battlemage Graphics
263+
runner: '["Linux", "bmg"]'
264+
target_devices: level_zero_v2:gpu
265+
- name: NVIDIA/CUDA
266+
runner: '["Linux", "cuda"]'
267+
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN
268+
target_devices: cuda:gpu
269+
- name: AMD/HIP
270+
runner: '["Linux", "amdgpu"]'
271+
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
272+
target_devices: hip:gpu
273+
extra_lit_opts: -j 1
274+
275+
uses: ./.github/workflows/sycl-linux-run-tests.yml
276+
with:
277+
name: ${{ matrix.name }} with NewOffloadModel
278+
runner: ${{ matrix.runner }}
279+
image: ${{ matrix.image }}
280+
image_options: ${{ matrix.image_options || '-u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN' }}
281+
target_devices: ${{ matrix.target_devices }}
282+
extra_lit_opts: ${{ matrix.extra_lit_opts }} --param enable_new_offload_model=True
283+
repo_ref: ${{ github.sha }}
284+
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
285+
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
286+
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}
287+
binaries_artifact: 'e2e_bin_new_offload_model'
288+
testing_mode: 'run-only'
289+
290+
239291
test-perf:
240292
needs: [build, detect_changes]
241293
permissions:

.github/workflows/sycl-nightly.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
toolchain_artifact_filename: sycl_linux_libcxx.tar.zst
9393

9494
ubuntu2204_test:
95+
name: ubuntu2204_test
9596
needs: [ubuntu2204_build]
9697
permissions:
9798
contents: write
@@ -100,6 +101,7 @@ jobs:
100101
strategy:
101102
fail-fast: false
102103
matrix:
104+
enable_new_offload_model: ['False', 'True']
103105
include:
104106
- name: AMD/HIP
105107
runner: '["Linux", "amdgpu"]'
@@ -111,6 +113,7 @@ jobs:
111113
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
112114
target_devices: hip:gpu
113115
extra_lit_opts: --param test-preview-mode=True
116+
enable_new_offload_model: 'False'
114117

115118
- name: NVIDIA/CUDA
116119
runner: '["Linux", "cuda"]'
@@ -122,6 +125,7 @@ jobs:
122125
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN
123126
target_devices: cuda:gpu
124127
extra_lit_opts: --param test-preview-mode=True
128+
enable_new_offload_model: 'False'
125129

126130
- name: Intel L0 Gen12 GPU
127131
runner: '["Linux", "gen12"]'
@@ -139,6 +143,7 @@ jobs:
139143
runner: '["Linux", "bmg"]'
140144
target_devices: level_zero:gpu
141145
extra_lit_opts: --param test-preview-mode=True
146+
enable_new_offload_model: 'False'
142147

143148
- name: Intel L0 Arc A-Series GPU
144149
runner: '["Linux", "arc"]'
@@ -167,15 +172,16 @@ jobs:
167172
runner: '["Linux", "pvc"]'
168173
target_devices: level_zero:gpu
169174
extra_lit_opts: --param test-preview-mode=True
175+
enable_new_offload_model: 'False'
170176

171177
uses: ./.github/workflows/sycl-linux-run-tests.yml
172178
with:
173-
name: ${{ matrix.name }}
179+
name: ${{ matrix.name }} with ${{ matrix.enable_new_offload_model == 'True' && 'New Offload Model' || 'Old Offload Model' }}
174180
runner: ${{ matrix.runner }}
175181
image_options: ${{ matrix.image_options || '-u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN' }}
176182
target_devices: ${{ matrix.target_devices }}
177183
tests_selector: e2e
178-
extra_lit_opts: "--param 'cxx_flags=-D_GLIBCXX_USE_CXX11_ABI=0' ${{ matrix.extra_lit_opts }}"
184+
extra_lit_opts: "--param 'cxx_flags=-D_GLIBCXX_USE_CXX11_ABI=0' ${{ matrix.extra_lit_opts }} --param enable_new_offload_model=${{ matrix.enable_new_offload_model }}"
179185
repo_ref: ${{ github.sha }}
180186
toolchain_artifact: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact }}
181187
toolchain_artifact_filename: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact_filename }}
@@ -214,13 +220,15 @@ jobs:
214220

215221
e2e-win:
216222
needs: build-win
223+
name: E2E win with ${{ matrix.enable_new_offload_model == 'True' && 'New Offload Model' || 'Old Offload Model' }}
217224
# Continue if build was successful.
218225
if: |
219226
!cancelled()
220227
&& needs.build-win.outputs.build_conclusion == 'success'
221228
strategy:
222229
fail-fast: false
223230
matrix:
231+
enable_new_offload_model: ['False', 'True']
224232
include:
225233
- name: Intel Gen12 GPU
226234
runner: '["Windows", "gen12"]'
@@ -237,6 +245,7 @@ jobs:
237245
runner: ${{ matrix.runner }}
238246
target_devices: level_zero:gpu
239247
toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }}
248+
extra_lit_opts: --param enable_new_offload_model=${{ matrix.enable_new_offload_model }}
240249

241250
cuda-aws-start:
242251
needs: [ubuntu2204_build]

.github/workflows/sycl-windows-build.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ on:
5050
type: string
5151
required: false
5252

53+
e2e_binaries_new_offload_model_artifact:
54+
type: string
55+
required: false
56+
5357
outputs:
5458
build_conclusion:
5559
value: ${{ jobs.build.outputs.build_conclusion }}
@@ -255,6 +259,21 @@ jobs:
255259
extra_lit_opts: --param sycl_build_targets="spir"
256260
cxx: ${{ inputs.cxx }}
257261

262+
- name: Build E2E tests with New Offload Model
263+
if: |
264+
inputs.e2e_binaries_artifact &&
265+
!cancelled() &&
266+
steps.build.conclusion == 'success' &&
267+
contains(github.event.pull_request.labels.*.name, 'new-offload-model')
268+
uses: ./devops/actions/run-tests/windows/e2e
269+
with:
270+
ref: ${{ inputs.ref || github.sha }}
271+
testing_mode: build-only
272+
target_devices: all
273+
binaries_artifact: ${{ inputs.e2e_binaries_new_offload_model_artifact }}
274+
extra_lit_opts: --param sycl_build_targets="spir" --param enable_new_offload_model=True
275+
cxx: ${{ inputs.cxx }}
276+
258277
- name: Detect hung tests
259278
if: always()
260279
shell: powershell

.github/workflows/sycl-windows-precommit.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
with:
5858
changes: ${{ needs.detect_changes.outputs.filters }}
5959
e2e_binaries_artifact: sycl_windows_e2ebin
60+
e2e_binaries_new_offload_model_artifact: sycl_windows_e2ebin_with_new_offload_model
6061

6162
run_prebuilt_e2e_tests:
6263
needs: build
@@ -82,3 +83,30 @@ jobs:
8283
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
8384
testing_mode: run-only
8485
binaries_artifact: sycl_windows_e2ebin
86+
87+
run_prebuilt_e2e_with_new_offload_model_tests:
88+
needs: build
89+
# Continue if build was successful.
90+
if: |
91+
!cancelled() &&
92+
needs.build.outputs.build_conclusion == 'success' &&
93+
contains(github.event.pull_request.labels.*.name, 'new-offload-model')
94+
strategy:
95+
fail-fast: false
96+
matrix:
97+
include:
98+
- name: Intel GEN12 Graphics with Level Zero
99+
runner: '["Windows","gen12"]'
100+
- name: Intel Arc Graphics with Level Zero
101+
runner: '["Windows","arc"]'
102+
- name: Intel Battlemage Graphics with Level Zero
103+
runner: '["Windows","bmg"]'
104+
uses: ./.github/workflows/sycl-windows-run-tests.yml
105+
with:
106+
name: ${{ matrix.name }}
107+
runner: ${{ matrix.runner }}
108+
target_devices: "level_zero:gpu"
109+
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
110+
testing_mode: run-only
111+
binaries_artifact: sycl_windows_e2ebin_with_new_offload_model
112+
extra_lit_opts: --param enable_new_offload_model=True

sycl/test-e2e/AOT/multiple-devices.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
// XFAIL: new-offload-model && run-mode
10+
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/20797
11+
912
// REQUIRES: opencl-aot, ocloc, any-device-is-cpu, any-device-is-gpu, target-spir, opencl-cpu-rt
1013

1114
// Produce a fat object for all targets (generic SPIR-V, CPU, GPU)

sycl/test-e2e/Compression/compression.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// XFAIL: new-offload-model && target-amd
2+
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/20797
3+
14
// End-to-End test for testing device image compression.
25
// REQUIRES: zstd
36

sycl/test-e2e/Compression/compression_multiple_tu.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// XFAIL: new-offload-model && target-amd
2+
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/20797
3+
14
// End-to-End test for testing device image compression when we have two
25
// translation units, one compressed and one not compressed.
36
// REQUIRES: zstd, linux

sycl/test-e2e/DeviceLib/rand_test.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// XFAIL: new-offload-model && target-amd
2+
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/20797
3+
14
// RUN: %{build} -o %t.out
25
// RUN: %{run} %t.out
36

sycl/test-e2e/E2EExpr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class E2EExpr(BooleanExpression):
4848
"pdtracker",
4949
"ze_debug",
5050
"device-config-file",
51+
"new-offload-model",
5152
}
5253

5354
def __init__(self, string, variables, build_only_mode, final_unknown_value):

0 commit comments

Comments
 (0)