Skip to content

Commit efe036e

Browse files
[CI] Add backward ABI-compatibility testing to pre-commit (#19719)
1 parent 3b05692 commit efe036e

File tree

5 files changed

+109
-7
lines changed

5 files changed

+109
-7
lines changed

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

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,27 @@ jobs:
7979

8080
toolchain_artifact: sycl_linux_ubuntu22
8181

82+
compat_read_exclude:
83+
name: Read compatibility testing exclude list
84+
runs-on: [Linux, build]
85+
outputs:
86+
FILTER: ${{ steps.result.outputs.FILTER }}
87+
steps:
88+
- uses: actions/checkout@v4
89+
with:
90+
sparse-checkout: |
91+
devops/
92+
- name: Register cleanup after job is finished
93+
uses: ./devops/actions/cleanup
94+
- id: result
95+
shell: bash
96+
run: |
97+
# Transform to format expected by `llvm-lit --filter-out "pattern1|pattern2|..."`.
98+
# First, remove comments/empty lines, then join lines with "|" as separator.
99+
echo FILTER="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_2 | paste -sd '|')" >> $GITHUB_OUTPUT
100+
82101
run_prebuilt_e2e_tests:
83-
needs: [build, detect_changes]
102+
needs: [build, detect_changes, compat_read_exclude]
84103
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
85104
strategy:
86105
fail-fast: false
@@ -124,6 +143,12 @@ jobs:
124143
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
125144
extra_lit_opts: --param test-preview-mode=True
126145
e2e_binaries_artifact: e2e_bin_preview
146+
- name: ABI compatibility against sycl-rel-6_2
147+
runner: '["Linux", "pvc"]'
148+
image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2
149+
target_devices: level_zero:gpu
150+
extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER }}"'
151+
e2e_binaries_artifact: 'in-container'
127152

128153
uses: ./.github/workflows/sycl-linux-run-tests.yml
129154
with:

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ on:
6262
description: |
6363
When set in modes other than `run-only` results in artifact upload.
6464
For `run-only` mode, if specified, means downloading pre-built
65-
binaries from the artifact, otherwise they are expected to be part of
66-
the container.
65+
binaries from the artifact. If set to special value `in-container`
66+
then the binaries are expected to be stored in the container image
67+
instead of coming from an artifact.
6768
type: string
6869
default: ''
6970
required: False

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525
- '.github/workflows/trivy.yml'
2626
- 'devops/containers/**'
2727
- 'devops/actions/build_container/**'
28+
- 'devops/compat_ci_exclude.sycl-rel-6_2'
2829
- 'unified-runtime/examples/**'
2930
- 'unified-runtime/scripts/**'
3031
- 'unified-runtime/test/**'

devops/actions/run-tests/e2e/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ runs:
2424
using: "composite"
2525
steps:
2626
- name: Checkout E2E tests
27-
if: ${{ !(inputs.testing_mode == 'run-only' && inputs.binaries_artifact == '') }}
27+
if: ${{ !(inputs.testing_mode == 'run-only' && inputs.binaries_artifact == 'in-container') }}
2828
uses: actions/checkout@v4
2929
with:
3030
path: llvm
@@ -33,19 +33,19 @@ runs:
3333
llvm/utils/lit
3434
sycl/test-e2e
3535
- name: Download E2E Binaries
36-
if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact != '' }}
36+
if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact != 'in-container' }}
3737
uses: actions/download-artifact@v4
3838
with:
3939
name: ${{ inputs.binaries_artifact }}
4040
- name: Extract E2E Binaries
41-
if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact != '' }}
41+
if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact != 'in-container' }}
4242
shell: bash
4343
run: |
4444
mkdir build-e2e
4545
tar -I 'zstd' -xf e2e_binaries.tar.zst -C build-e2e
4646
4747
- name: Extract E2E tests from container image
48-
if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact == '' }}
48+
if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact == 'in-container' }}
4949
shell: bash
5050
run: |
5151
mkdir build-e2e llvm

devops/compat_ci_exclude.sycl-rel-6_2

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Known OK:
2+
3+
# https://github.com/intel/llvm/pull/18059 made property a no-op, so `FileCheck`
4+
# fails, but that isn't an actual ABI break.
5+
DiscardEvents/discard_events_accessors.cpp
6+
DiscardEvents/discard_events_using_assert_ndebug.cpp
7+
DiscardEvents/discard_events_usm.cpp
8+
DiscardEvents/invalid_event.cpp
9+
DiscardEvents/invalid_event_exceptions.cpp
10+
11+
# https://github.com/intel/llvm/pull/18287
12+
# Throw exception instead of returning garbage
13+
Basic/info.cpp
14+
15+
# Likely OK, but need author to provide justification, get approval/confirmation
16+
# from someone:
17+
18+
# https://github.com/intel/llvm/pull/18565
19+
# This one should have probably be done in multiple PRs, first improving the
20+
# test's CHECKs and then making an actual functional change.
21+
#
22+
# Based on the title, I'd expect to see reduction in number of ur*retain/release
23+
# calls, but it only moves a few ur*release CHECKs, so I'll let the author
24+
# update this explanation.
25+
KernelAndProgram/disable-caching.cpp
26+
27+
# https://github.com/intel/llvm/pull/18253 broke at least some of the pre-built
28+
# E2E binaries, but do we really need to provide backward compatibility for
29+
# binaries built with sanitizers?
30+
Sanitizer
31+
32+
# https://github.com/intel/llvm/pull/19238
33+
NonUniformGroups/opportunistic_group.cpp
34+
35+
# https://github.com/intel/llvm/pull/17955, experimental extension
36+
AsyncAlloc/device/async_alloc_from_pool.cpp
37+
AsyncAlloc/device/async_alloc_zero_init.cpp
38+
AsyncAlloc/device/ooo_queue_async_alloc_from_pool.cpp
39+
40+
# Need more investigation by the author:
41+
42+
# https://github.com/intel/llvm/pull/18314
43+
Assert/assert_in_kernels.cpp
44+
Assert/assert_in_multiple_tus.cpp
45+
Assert/assert_in_multiple_tus_one_ndebug.cpp
46+
Assert/assert_in_one_kernel.cpp
47+
Assert/assert_in_simultaneous_kernels.cpp
48+
Assert/assert_in_simultaneously_multiple_tus.cpp
49+
Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp
50+
51+
# https://github.com/intel/llvm/pull/17442
52+
KernelCompiler/opencl.cpp
53+
KernelCompiler/opencl_cache_eviction.cpp
54+
KernelCompiler/opencl_queries.cpp
55+
56+
# https://github.com/intel/llvm/pull/18403 (pulldown, so probably offload-tools
57+
# team should be looking into this)
58+
DeviceImageDependencies/NewOffloadDriver/dynamic.cpp
59+
DeviceImageDependencies/NewOffloadDriver/free_function_kernels.cpp
60+
DeviceImageDependencies/NewOffloadDriver/math_device_lib.cpp
61+
DeviceImageDependencies/NewOffloadDriver/objects.cpp
62+
DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp
63+
NewOffloadDriver/aot-gpu.cpp
64+
NewOffloadDriver/buffer.cpp
65+
NewOffloadDriver/multisource.cpp
66+
NewOffloadDriver/spirv_device_obj_smoke.cpp
67+
NewOffloadDriver/split-per-source-main.cpp
68+
NewOffloadDriver/sycl-external-with-optional-features.cpp
69+
70+
# https://github.com/intel/llvm/pull/18277
71+
InOrderEventsExt/get_last_event.cpp
72+
InorderQueue/in_order_ext_oneapi_submit_barrier.cpp
73+
74+
# https://github.com/intel/llvm/pull/19328
75+
Adapters/interop-level-zero-buffer-ownership.cpp

0 commit comments

Comments
 (0)