Skip to content

Commit 2ee62ad

Browse files
authored
[CI] Use prebuilt E2E binaries when running on Windows Gen12 (#17335)
Windows Gen12 job, previously took around 42min. With prebuilt binaries building the e2e tests takes around 12min, and running them took around 6min.
1 parent 585606a commit 2ee62ad

27 files changed

+128
-36
lines changed

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

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,25 @@ jobs:
5050
with:
5151
changes: ${{ needs.detect_changes.outputs.filters }}
5252

53-
e2e:
53+
build-e2e:
5454
needs: build
5555
# Continue if build was successful.
56+
if: |
57+
always()
58+
&& !cancelled()
59+
&& needs.build.outputs.build_conclusion == 'success'
60+
uses: ./.github/workflows/sycl-windows-run-tests.yml
61+
with:
62+
name: Build Windows E2E tests
63+
runner: '["Windows", "build-e2e"]'
64+
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
65+
e2e_testing_mode: build-only
66+
extra_lit_opts: --param sycl_build_targets="spir"
67+
e2e_binaries_artifact: sycl_windows_e2ebin
68+
69+
run_prebuilt_e2e_tests:
70+
needs: [build, build-e2e]
71+
# Continue if build was successful.
5672
if: |
5773
always()
5874
&& !cancelled()
@@ -63,10 +79,30 @@ jobs:
6379
include:
6480
- name: Intel GEN12 Graphics with Level Zero
6581
runner: '["Windows","gen12"]'
82+
uses: ./.github/workflows/sycl-windows-run-tests.yml
83+
with:
84+
name: ${{ matrix.name }}
85+
runner: ${{ matrix.runner }}
86+
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
87+
e2e_testing_mode: run-only
88+
e2e_binaries_artifact: sycl_windows_e2ebin
89+
90+
run_full_e2e_tests:
91+
needs: build
92+
# Continue if build was successful.
93+
if: |
94+
always()
95+
&& !cancelled()
96+
&& needs.build.outputs.build_conclusion == 'success'
97+
strategy:
98+
fail-fast: false
99+
matrix:
100+
include:
66101
- name: Intel Battlemage Graphics with Level Zero
67102
runner: '["Windows","bmg"]'
68103
uses: ./.github/workflows/sycl-windows-run-tests.yml
69104
with:
70105
name: ${{ matrix.name }}
71106
runner: ${{ matrix.runner }}
72107
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
108+
e2e_testing_mode: full

.github/workflows/sycl-windows-run-tests.yml

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ on:
6363
required: false
6464
default: "cl"
6565

66+
e2e_testing_mode:
67+
type: string
68+
default: "full"
69+
70+
e2e_binaries_artifact:
71+
type: string
72+
default: ''
73+
required: False
74+
6675
cts_testing_mode:
6776
description: |
6877
Testing mode to run SYCL-CTS in, can be either `full`, `build-only`
@@ -143,17 +152,36 @@ jobs:
143152
sycl-ls
144153
- run: |
145154
sycl-ls --verbose
155+
156+
- name: Download E2E Binaries
157+
if: ${{ inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'run-only' }}
158+
uses: actions/download-artifact@v4
159+
with:
160+
name: ${{ inputs.e2e_binaries_artifact }}
161+
- name: Extract E2E Binaries
162+
if: ${{ inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'run-only' }}
163+
shell: bash
164+
run: |
165+
mkdir build-e2e
166+
tar -xf e2e_bin.tar.gz -C build-e2e
167+
146168
- name: Configure E2E with Level Zero target
147169
if: inputs.tests_selector == 'e2e'
148170
shell: cmd
149171
run: |
150172
mkdir build-e2e
151173
cmake -GNinja -B build-e2e -S.\llvm\sycl\test-e2e -DSYCL_TEST_E2E_TARGETS="level_zero:gpu" -DCMAKE_CXX_COMPILER="clang++" -DLEVEL_ZERO_LIBS_DIR="D:\\github\\level-zero_win-sdk\\lib" -DLEVEL_ZERO_INCLUDE="D:\\github\\level-zero_win-sdk\\include" -DLLVM_LIT="..\\llvm\\llvm\\utils\\lit\\lit.py"
174+
175+
- name: Keep track of files after configuring E2E step
176+
if: ${{ always() && inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'build-only' }}
177+
shell: bash
178+
run: ls build-e2e > e2econf_files.txt
179+
152180
- name: Run End-to-End tests
153181
if: inputs.tests_selector == 'e2e'
154182
shell: bash {0}
155183
env:
156-
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param print_features=True ${{ inputs.extra_lit_opts }}
184+
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param print_features=True --param test-mode=${{ inputs.e2e_testing_mode }} ${{ inputs.extra_lit_opts }}
157185
run: |
158186
# Run E2E tests.
159187
if [[ ${{inputs.compiler}} == 'icx' ]]; then
@@ -169,6 +197,30 @@ jobs:
169197
fi
170198
exit $exit_code
171199
200+
# Github CI doesn't support containers on Windows, so we cannot guarantee
201+
# that paths are the same between building and running systems. To avoid
202+
# CMake issues related to absolute paths we reconfigure the build-e2e
203+
# folder on the run system.
204+
- name: Remove E2E configuration files
205+
if: ${{ always() && inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'build-only' }}
206+
shell: bash
207+
run: |
208+
for FILE in $(cat e2econf_files.txt); do rm -r build-e2e/$FILE; done
209+
rm e2econf_files.txt
210+
211+
- name: Pack E2E test binaries
212+
if: ${{ always() && inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'build-only' }}
213+
shell: bash
214+
run: |
215+
tar -czf e2e_bin.tar.gz -C build-e2e .
216+
- name: Upload E2E test binaries
217+
if: ${{ always() && inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'build-only' }}
218+
uses: actions/upload-artifact@v4
219+
with:
220+
name: ${{ inputs.e2e_binaries_artifact }}
221+
path: e2e_bin.tar.gz
222+
retention-days: 3
223+
172224
- name: Run SYCL CTS Tests
173225
if: inputs.tests_selector == 'cts'
174226
uses: ./devops/actions/run-tests/windows/cts

sycl/test-e2e/AOT/cpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===---------------------------------------------------------------------===//
88

9-
// REQUIRES: opencl-aot, cpu
9+
// REQUIRES: opencl-aot, cpu, opencl-cpu-rt
1010

1111
// CPU AOT targets host isa, so we compile on the run system instead.
1212
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/aot.cpp -o %t.out

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// REQUIRES: opencl-aot, ocloc, cpu, gpu, target-spir
9+
// REQUIRES: opencl-aot, ocloc, cpu, gpu, target-spir, opencl-cpu-rt
1010

1111
// Produce a fat object for all targets (generic SPIR-V, CPU, GPU)
1212
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64,spir64_gen %S/Inputs/aot.cpp -c -o %t.o

sycl/test-e2e/AOT/reqd-sg-size.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test ensures that a program that has a kernel
22
// using various required sub-group sizes can be compiled AOT.
33

4-
// REQUIRES: ocloc, opencl-aot, any-device-is-cpu
4+
// REQUIRES: ocloc, opencl-aot, any-device-is-cpu, opencl-cpu-rt
55
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_tgllp -o %t.tgllp.out %s
66
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s
77

sycl/test-e2e/Adapters/cuda_queue_priority.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: gpu, cuda, cuda_dev_kit
1+
// REQUIRES: target-nvidia, cuda_dev_kit
22
// RUN: %{build} %cuda_options -o %t.out
33
// RUN: %{run} %t.out
44
//

sycl/test-e2e/Adapters/sycl-targets-order.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: %{run-unfiltered-devices} env ONEAPI_DEVICE_SELECTOR="opencl:*" %t-nvptx64-spir64.out
66
// RUN: %{run-unfiltered-devices} env ONEAPI_DEVICE_SELECTOR="cuda:*" %t-nvptx64-spir64.out
77

8-
// REQUIRES: opencl, target-spir, any-triple-is-nvidia
8+
// REQUIRES: opencl, target-spir, any-target-is-nvidia
99

1010
//==------- sycl-targets-order.cpp - SYCL -fsycl-targets order test --------==//
1111
//

sycl/test-e2e/Basic/interop/make_kernel_subdevice_l0.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// REQUIRES: level_zero, opencl, level_zero_dev_kit
2-
// RUN: %{build} %level_zero_options -lOpenCL -o %t.ze.out
1+
// REQUIRES: level_zero, opencl, level_zero_dev_kit, opencl_icd
2+
// RUN: %{build} %level_zero_options %opencl_lib -o %t.ze.out
33
// RUN: %{run-unfiltered-devices} env ONEAPI_DEVICE_SELECTOR="level_zero:*" %t.ze.out
44

55
#include <cstdlib>

sycl/test-e2e/DeviceImageBackendContent/CUDA_interop_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %{build} %cuda_options -o %t.out
22
// RUN: %{run} %t.out
3-
// REQUIRES: cuda, cuda_dev_kit
3+
// REQUIRES: target-nvidia, cuda_dev_kit
44

55
#include <cuda.h>
66
#include <sycl/backend.hpp>

sycl/test-e2e/E2EExpr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class E2EExpr(BooleanExpression):
1414
"any-target-is-nvidia",
1515
"any-target-is-amd",
1616
"any-target-is-native_cpu",
17+
"opencl-cpu-rt",
1718
"spirv-backend",
1819
"linux",
1920
"system-linux",

0 commit comments

Comments
 (0)