Skip to content

Commit 55819e8

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into sycl
2 parents 04ed132 + cc4dee4 commit 55819e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+293
-59
lines changed

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

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,53 @@ jobs:
7272
else
7373
echo 'arc_tests="Matrix/"' >> "$GITHUB_OUTPUT"
7474
fi
75+
76+
build_e2e_tests:
77+
needs: [build]
78+
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
79+
uses: ./.github/workflows/sycl-linux-run-tests.yml
80+
with:
81+
name: Build e2e tests
82+
runner: '["Linux", "build"]'
83+
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
84+
image_options: -u 1001
85+
ref: ${{ github.sha }}
86+
merge_ref: ''
87+
sycl_toolchain_artifact: sycl_linux_default
88+
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
89+
sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }}
90+
e2e_testing_mode: 'build-only'
91+
run_prebuilt_e2e_tests:
92+
needs: [build, build_e2e_tests]
93+
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
94+
strategy:
95+
fail-fast: false
96+
matrix:
97+
include:
98+
- name: Intel
99+
runner: '["Linux", "gen12"]'
100+
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
101+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
102+
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
103+
reset_intel_gpu: true
104+
extra_lit_opts: --param gpu-intel-gen12=True
105+
uses: ./.github/workflows/sycl-linux-run-tests.yml
106+
with:
107+
name: ${{ matrix.name }}
108+
runner: ${{ matrix.runner }}
109+
image: ${{ matrix.image }}
110+
image_options: ${{ matrix.image_options }}
111+
target_devices: ${{ matrix.target_devices }}
112+
extra_lit_opts: --param fallback-to-build-if-requires-build-and-run=True ${{ matrix.extra_lit_opts }}
113+
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
114+
ref: ${{ github.sha }}
115+
merge_ref: ''
116+
sycl_toolchain_artifact: sycl_linux_default
117+
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
118+
sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }}
119+
e2e_binaries_artifact: sycl_e2e_bin_default
120+
e2e_testing_mode: 'run-only'
121+
75122
test:
76123
needs: [build, detect_changes, determine_arc_tests]
77124
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
@@ -90,13 +137,6 @@ jobs:
90137
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
91138
target_devices: ext_oneapi_hip:gpu
92139
reset_intel_gpu: false
93-
- name: Intel
94-
runner: '["Linux", "gen12"]'
95-
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
96-
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
97-
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
98-
reset_intel_gpu: true
99-
extra_lit_opts: --param gpu-intel-gen12=True
100140
- name: E2E tests on Intel Arc A-Series Graphics
101141
runner: '["Linux", "arc"]'
102142
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest

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

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919

2020
target_devices:
2121
type: string
22-
required: True
22+
required: False
2323
extra_cmake_args:
2424
type: string
2525
required: False
@@ -59,6 +59,30 @@ on:
5959
default: ''
6060
required: False
6161

62+
e2e_binaries_artifact:
63+
description: |
64+
By setting this the E2E binaries folder will not be created, rather it
65+
will be downloaded and extracted from the specified artifact. When
66+
running tests in `run-only` mode this must be provided.
67+
type: string
68+
default: ''
69+
required: False
70+
e2e_testing_mode:
71+
description: |
72+
Testing mode to run E2E tests in, can be either `full`, `build-only`
73+
or `run-only`. In `build-only` mode an artifact of the E2E binaries
74+
will be uploaded.
75+
type: string
76+
default: 'full'
77+
artifact_suffix:
78+
description: 'Suffix for E2E binaries artifact that is output when in `build-only`.'
79+
type: string
80+
default: 'default'
81+
retention-days:
82+
description: 'E2E binaries artifact retention period.'
83+
type: string
84+
default: 1
85+
6286
reset_intel_gpu:
6387
type: string
6488
required: False
@@ -90,6 +114,7 @@ on:
90114
- '["amdgpu"]'
91115
- '["Linux", "arc"]'
92116
- '["cts-cpu"]'
117+
- '["Linux", "build"]'
93118
image:
94119
description: |
95120
Use option ending with ":build" for AMDGPU, ":latest" for the rest.
@@ -145,6 +170,11 @@ on:
145170
options:
146171
- false
147172
- true
173+
e2e_testing_mode:
174+
type: choice
175+
options:
176+
- "full"
177+
- "build-only"
148178

149179
permissions:
150180
contents: read
@@ -297,8 +327,19 @@ jobs:
297327
cat /usr/local/lib/igc/IGCTAG.txt
298328
fi
299329
330+
- name: Download E2E Binaries
331+
if: inputs.e2e_binaries_artifact != ''
332+
uses: actions/download-artifact@v4
333+
with:
334+
name: ${{ inputs.e2e_binaries_artifact }}
335+
- name: Extract E2E Binaries
336+
if: inputs.e2e_binaries_artifact != ''
337+
run: |
338+
mkdir build-e2e
339+
tar -I 'zstd' -xf e2e_binaries.tar.zst -C build-e2e
340+
300341
- name: Deduce E2E CMake options
301-
if: inputs.tests_selector == 'e2e'
342+
if: inputs.tests_selector == 'e2e' && inputs.e2e_binaries_artifact == ''
302343
id: cmake_opts
303344
shell: bash
304345
env:
@@ -308,14 +349,14 @@ jobs:
308349
echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT
309350
fi
310351
- name: Configure E2E tests
311-
if: inputs.tests_selector == 'e2e'
352+
if: inputs.tests_selector == 'e2e' && inputs.e2e_binaries_artifact == ''
312353
run: |
313-
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DSYCL_TEST_E2E_TARGETS="${{ inputs.target_devices }}" -DCMAKE_CXX_COMPILER="$(which clang++)" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
354+
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="$(which clang++)" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
314355
- name: SYCL End-to-end tests
315356
shell: bash {0}
316357
if: inputs.tests_selector == 'e2e'
317358
env:
318-
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}
359+
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param test-mode=${{ inputs.e2e_testing_mode }} --param sycl_devices=${{ inputs.target_devices }} ${{ inputs.extra_lit_opts }}
319360
run: |
320361
ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1
321362
exit_code=$?
@@ -402,3 +443,13 @@ jobs:
402443
grep 'exit code: [^0]' -r logs >> $GITHUB_STEP_SUMMARY
403444
404445
exit $ret
446+
- name: Pack E2E binaries
447+
if: ${{ always() && !cancelled() && inputs.e2e_testing_mode == 'build-only'}}
448+
run: tar -I 'zstd -9' -cf e2e_binaries.tar.zst -C ./build-e2e .
449+
- name: Upload E2E binaries
450+
if: ${{ always() && !cancelled() && inputs.e2e_testing_mode == 'build-only'}}
451+
uses: actions/upload-artifact@v4
452+
with:
453+
name: sycl_e2e_bin_${{ inputs.artifact_suffix }}
454+
path: e2e_binaries.tar.zst
455+
retention-days: ${{ inputs.retention-days }}

sycl/test-e2e/AOT/cpu.cpp

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

99
// REQUIRES: opencl-aot, cpu
10+
// REQUIRES: build-and-run-mode
1011

1112
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/aot.cpp -o %t.out
1213
// RUN: %{run} %t.out

sycl/test-e2e/AOT/double.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// using fp64 can be compiled AOT.
33

44
// REQUIRES: ocloc, opencl-aot, any-device-is-cpu
5+
// REQUIRES: build-and-run-mode
56
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_tgllp -o %t.tgllp.out %s
67
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s
78
// RUN: %if cpu %{ %{run} %t.x86.out %}

sycl/test-e2e/AOT/half.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// using fp16 can be compiled AOT.
33

44
// REQUIRES: ocloc, opencl-aot, any-device-is-cpu
5+
// REQUIRES: build-and-run-mode
56
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_tgllp -o %t.tgllp.out %s
67
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s
78
// RUN: %if cpu %{ %{run} %t.x86.out %}

sycl/test-e2e/Adapters/sycl-ls-gpu-default-any.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// REQUIRES: gpu
2+
// REQUIRES: build-and-run-mode
23

34
// TODO: Remove unsetting SYCL_DEVICE_FILTER when feature is dropped
45
// RUN: env --unset=SYCL_DEVICE_FILTER --unset=ONEAPI_DEVICE_SELECTOR sycl-ls --verbose >%t.default.out

sycl/test-e2e/Adapters/sycl-ls-gpu-default-level-zero.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// REQUIRES: gpu, level-zero
2+
// REQUIRES: build-and-run-mode
23

34
// TODO: Remove unsetting SYCL_DEVICE_FILTER when feature is dropped
45
// RUN: env --unset=SYCL_DEVICE_FILTER --unset=ONEAPI_DEVICE_SELECTOR sycl-ls --verbose >%t.default.out

sycl/test-e2e/Adapters/sycl-ls-gpu-level-zero.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// REQUIRES: gpu, level_zero
2+
// REQUIRES: build-and-run-mode
23

34
// RUN: sycl-ls --verbose >%t.default.out
45
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.default.out

sycl/test-e2e/Adapters/sycl-ls-gpu-opencl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// REQUIRES: gpu, opencl
2+
// REQUIRES: build-and-run-mode
23

34
// RUN: env ONEAPI_DEVICE_SELECTOR="opencl:*" sycl-ls --verbose >%t.opencl.out
45
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.opencl.out

sycl/test-e2e/Adapters/sycl-ls-uuid-subdevs.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* Test to check that sycl-ls is outputting UUID and number of sub and sub-sub
2+
// REQUIRES: build-and-run-mode
23
* devices. */
34
// REQUIRES: gpu, level_zero
45

0 commit comments

Comments
 (0)