Skip to content

Commit e406fa3

Browse files
committed
Merge branch 'sycl' into skip-unsupported-access
2 parents 7df60ee + 2824f61 commit e406fa3

File tree

95 files changed

+2322
-1395
lines changed

Some content is hidden

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

95 files changed

+2322
-1395
lines changed

.github/workflows/sycl-containers-igc-dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
imagefile: ubuntu2404_intel_drivers
3434
tag: devigc
3535
build_args: |
36-
"use_latest=false"
36+
"use_unstable_driver=false"
3737
"use_igc_dev=true"
3838
steps:
3939
- name: Checkout

.github/workflows/sycl-containers.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,37 @@ jobs:
4343
file: ubuntu2404_base
4444
tag: latest
4545
build_args: ""
46-
- name: Build Ubuntu Docker image
46+
- name: Build Ubuntu 22.04 Docker image
4747
file: ubuntu2204_build
4848
tag: latest
4949
build_args: ""
50+
- name: Build Ubuntu 24.04 Docker image
51+
file: ubuntu2404_build
52+
tag: latest
53+
build_args: ""
5054
- name: Build Ubuntu 24.04 oneAPI Docker image
5155
file: ubuntu2404_build_oneapi
5256
tag: latest
5357
build_args: ""
5458
- name: Intel Drivers Ubuntu 22.04 Docker image
5559
file: ubuntu2204_intel_drivers
5660
tag: latest
57-
build_args: "use_latest=false"
61+
build_args: "use_unstable_driver=false"
5862
- name: Intel Drivers Ubuntu 24.04 Docker image
5963
file: ubuntu2404_intel_drivers
6064
tag: latest
61-
build_args: "use_latest=false"
65+
build_args: "use_unstable_driver=false"
6266
- name: Intel Drivers (unstable) Ubuntu 24.04 Docker image
6367
file: ubuntu2404_intel_drivers
6468
tag: unstable
65-
build_args: "use_latest=true"
69+
build_args: "use_unstable_driver=true"
6670
- name: Build + Intel Drivers Ubuntu 22.04 Docker image
6771
file: ubuntu2204_intel_drivers
6872
tag: alldeps
6973
build_args: |
7074
base_image=ghcr.io/intel/llvm/ubuntu2204_build
7175
base_tag=latest
72-
use_latest=false
76+
use_unstable_driver=false
7377
steps:
7478
- name: Checkout
7579
uses: actions/checkout@v4
@@ -82,7 +86,6 @@ jobs:
8286
file: ${{ matrix.file }}
8387
username: ${{ github.repository_owner }}
8488
password: ${{ secrets.GITHUB_TOKEN }}
85-
sycl_ci_passwd: ${{ secrets.DOCKER_SUDO_PASSWORD }}
8689
tags: |
8790
ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}-${{ github.sha }}
8891
ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}

.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: 61 additions & 10 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
@@ -87,6 +111,7 @@ on:
87111
- '["amdgpu"]'
88112
- '["Linux", "arc"]'
89113
- '["cts-cpu"]'
114+
- '["Linux", "build"]'
90115
image:
91116
description: |
92117
Use option ending with ":build" for AMDGPU, ":latest" for the rest.
@@ -142,6 +167,11 @@ on:
142167
options:
143168
- false
144169
- true
170+
e2e_testing_mode:
171+
type: choice
172+
options:
173+
- "full"
174+
- "build-only"
145175

146176
permissions:
147177
contents: read
@@ -157,10 +187,10 @@ jobs:
157187
env: ${{ fromJSON(inputs.env) }}
158188
steps:
159189
- name: Reset Intel GPU
160-
if: false
190+
if: inputs.reset_intel_gpu == 'true'
161191
run: |
162-
cat /run/secrets/sycl_passwd | sudo -S mount -t debugfs none /sys/kernel/debug
163-
cat /run/secrets/sycl_passwd | sudo -S bash -c 'echo 1 > /sys/kernel/debug/dri/0/i915_wedged'
192+
sudo mount -t debugfs none /sys/kernel/debug
193+
sudo bash -c 'echo 1 > /sys/kernel/debug/dri/0/i915_wedged'
164194
- uses: actions/checkout@v4
165195
with:
166196
ref: ${{ inputs.ref }}
@@ -196,9 +226,9 @@ jobs:
196226
run: |
197227
if [ "${{ inputs.install_dev_igc_driver }}" = "true" ]; then
198228
# If libllvm14 is already installed (dev igc docker), still return true.
199-
cat /run/secrets/sycl_passwd | sudo -S apt-get install -yqq libllvm14 || true;
229+
sudo apt-get install -yqq libllvm14 || true;
200230
fi
201-
cat /run/secrets/sycl_passwd | sudo -S -E bash devops/scripts/install_drivers.sh llvm/devops/dependencies.json ${{ inputs.install_dev_igc_driver == 'true' && 'llvm/devops/dependencies-igc-dev.json --use-dev-igc' || '' }} --all
231+
sudo -E bash devops/scripts/install_drivers.sh llvm/devops/dependencies.json ${{ inputs.install_dev_igc_driver == 'true' && 'llvm/devops/dependencies-igc-dev.json --use-dev-igc' || '' }} --all
202232
- name: Source OneAPI TBB vars.sh
203233
shell: bash
204234
run: |
@@ -270,8 +300,19 @@ jobs:
270300
cat /usr/local/lib/igc/IGCTAG.txt
271301
fi
272302
303+
- name: Download E2E Binaries
304+
if: inputs.e2e_binaries_artifact != ''
305+
uses: actions/download-artifact@v4
306+
with:
307+
name: ${{ inputs.e2e_binaries_artifact }}
308+
- name: Extract E2E Binaries
309+
if: inputs.e2e_binaries_artifact != ''
310+
run: |
311+
mkdir build-e2e
312+
tar -I 'zstd' -xf e2e_binaries.tar.zst -C build-e2e
313+
273314
- name: Deduce E2E CMake options
274-
if: inputs.tests_selector == 'e2e'
315+
if: inputs.tests_selector == 'e2e' && inputs.e2e_binaries_artifact == ''
275316
id: cmake_opts
276317
shell: bash
277318
env:
@@ -281,14 +322,14 @@ jobs:
281322
echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT
282323
fi
283324
- name: Configure E2E tests
284-
if: inputs.tests_selector == 'e2e'
325+
if: inputs.tests_selector == 'e2e' && inputs.e2e_binaries_artifact == ''
285326
run: |
286-
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 }}
327+
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 }}
287328
- name: SYCL End-to-end tests
288329
shell: bash {0}
289330
if: inputs.tests_selector == 'e2e'
290331
env:
291-
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}
332+
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 }}
292333
run: |
293334
ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1
294335
exit_code=$?
@@ -375,3 +416,13 @@ jobs:
375416
grep 'exit code: [^0]' -r logs >> $GITHUB_STEP_SUMMARY
376417
377418
exit $ret
419+
- name: Pack E2E binaries
420+
if: ${{ always() && !cancelled() && inputs.e2e_testing_mode == 'build-only'}}
421+
run: tar -I 'zstd -9' -cf e2e_binaries.tar.zst -C ./build-e2e .
422+
- name: Upload E2E binaries
423+
if: ${{ always() && !cancelled() && inputs.e2e_testing_mode == 'build-only'}}
424+
uses: actions/upload-artifact@v4
425+
with:
426+
name: sycl_e2e_bin_${{ inputs.artifact_suffix }}
427+
path: e2e_binaries.tar.zst
428+
retention-days: ${{ inputs.retention-days }}

devops/actions/build_container/action.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ inputs:
2121
file:
2222
description: "Dockerfile"
2323
required: true
24-
sycl_ci_passwd:
25-
description: "Password to assign to sycl_ci user within a container"
26-
required: true
2724

2825
runs:
2926
using: "composite"
@@ -44,4 +41,3 @@ runs:
4441
file: ${{ github.workspace }}/devops/containers/${{ inputs.file }}.Dockerfile
4542
secrets: |
4643
github_token=${{ github.token }}
47-
sycl_ci_passwd=${{ inputs.sycl_ci_passwd }}

devops/containers/ubuntu2204_base.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ COPY scripts/install_build_tools.sh /install.sh
99
RUN /install.sh
1010

1111
COPY scripts/create-sycl-user.sh /user-setup.sh
12-
RUN --mount=type=secret,id=sycl_ci_passwd /user-setup.sh
12+
RUN /user-setup.sh
1313

1414
COPY actions/cached_checkout /actions/cached_checkout
1515
COPY actions/cleanup /actions/cleanup
1616
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
1717
COPY scripts/install_drivers.sh /opt/install_drivers.sh
1818

19-
USER sycl_ci
19+
USER sycl
2020

2121
ENTRYPOINT ["/docker_entrypoint.sh"]

devops/containers/ubuntu2204_build.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ RUN apt update && apt install -yqq rocm-dev && \
3131
rm -rf /var/lib/apt/lists/*
3232

3333
COPY scripts/create-sycl-user.sh /user-setup.sh
34-
RUN --mount=type=secret,id=sycl_ci_passwd /user-setup.sh
34+
RUN /user-setup.sh
3535

3636
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
3737

38-
USER sycl_ci
38+
USER sycl
3939

4040
ENTRYPOINT ["/docker_entrypoint.sh"]
4141

devops/containers/ubuntu2204_intel_drivers.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM $base_image:$base_tag
55

66
ENV DEBIAN_FRONTEND=noninteractive
77

8-
ARG use_latest=true
8+
ARG use_unstable_driver=true
99

1010
USER root
1111

@@ -18,7 +18,7 @@ COPY dependencies.json /
1818
RUN mkdir /runtimes
1919
ENV INSTALL_LOCATION=/runtimes
2020
RUN --mount=type=secret,id=github_token \
21-
if [ "$use_latest" = "true" ]; then \
21+
if [ "$use_unstable_driver" = "true" ]; then \
2222
install_driver_opt=" --use-latest"; \
2323
else \
2424
install_driver_opt=" dependencies.json"; \

devops/containers/ubuntu2404_base.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ COPY scripts/install_build_tools.sh /install.sh
99
RUN /install.sh
1010

1111
COPY scripts/create-sycl-user.sh /user-setup.sh
12-
RUN --mount=type=secret,id=sycl_ci_passwd /user-setup.sh
12+
RUN /user-setup.sh
1313

1414
COPY actions/cached_checkout /actions/cached_checkout
1515
COPY actions/cleanup /actions/cleanup
1616
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
1717
COPY scripts/install_drivers.sh /opt/install_drivers.sh
1818

19-
USER sycl_ci
19+
USER sycl
2020

2121
ENTRYPOINT ["/docker_entrypoint.sh"]
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FROM nvidia/cuda:12.6.3-devel-ubuntu24.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
USER root
6+
7+
# Install SYCL prerequisites
8+
COPY scripts/install_build_tools.sh /install.sh
9+
RUN /install.sh
10+
11+
SHELL ["/bin/bash", "-ec"]
12+
13+
# Make the directory if it doesn't exist yet.
14+
# This location is recommended by the distribution maintainers.
15+
RUN mkdir --parents --mode=0755 /etc/apt/keyrings
16+
# Download the key, convert the signing-key to a full
17+
# keyring required by apt and store in the keyring directory
18+
RUN wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
19+
gpg --dearmor | tee /etc/apt/keyrings/rocm.gpg > /dev/null && \
20+
# Add rocm repo
21+
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/6.3/ubuntu noble main" \
22+
| tee /etc/apt/sources.list.d/amdgpu.list && \
23+
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.3 noble main" \
24+
| tee --append /etc/apt/sources.list.d/rocm.list && \
25+
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \
26+
| tee /etc/apt/preferences.d/rocm-pin-600 && \
27+
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \
28+
| tee /etc/apt/preferences.d/rocm-pin-600
29+
# Install the ROCM kernel driver
30+
RUN apt update && apt install -yqq rocm-dev && \
31+
apt-get clean && \
32+
rm -rf /var/lib/apt/lists/*
33+
34+
COPY scripts/create-sycl-user.sh /user-setup.sh
35+
RUN /user-setup.sh
36+
37+
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
38+
39+
USER sycl
40+
41+
ENTRYPOINT ["/docker_entrypoint.sh"]
42+

0 commit comments

Comments
 (0)