Skip to content

Commit cee9c94

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into llvmspirv_pulldown
Conflicts: llvm-spirv/test/transcoding/multiple_user_semantic_on_struct.ll
2 parents 6e4f663 + 8ef4090 commit cee9c94

File tree

1,040 files changed

+39704
-14987
lines changed

Some content is hidden

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

1,040 files changed

+39704
-14987
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ sycl/plugins/unified_runtime/ @intel/dpcpp-l0-pi-reviewers
4343
# ESIMD CPU emulator plug-in
4444
sycl/plugins/esimd_emulator/ @intel/dpcpp-esimd-reviewers
4545

46-
# CUDA plugin
46+
# CUDA and HIP plugins
4747
sycl/plugins/**/cuda/ @intel/llvm-reviewers-cuda
48+
sycl/plugins/**/hip/ @intel/llvm-reviewers-cuda
4849

4950
# XPTI instrumentation utilities
5051
xpti/ @intel/llvm-reviewers-runtime
Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
name: SYCL E2E Matrix on Nightly build
22

33
on:
4-
workflow_call:
4+
workflow_dispatch:
55
inputs:
6-
ref:
7-
type: string
8-
required: true
9-
uniq:
10-
description: Unique string to name dynamic runners in AWS
11-
type: string
12-
required: false
13-
default: ${{ github.run_id }}-${{ github.run_attempt }}
6+
env:
7+
description: |
8+
Suggested variables: for E2E tests - LIT_FILTER, LIT_FILTER_OUT.
9+
LIT_OPTS won't work as we redefine it as part of this workflow.
10+
Format: '{"VAR1":"VAL1","VAR2":"VAL2",...}'
11+
default: '{"LIT_FILTER":""}'
1412

1513
jobs:
1614
linux_e2e_on_nightly:
@@ -22,37 +20,50 @@ jobs:
2220
- name: AMD/HIP
2321
runner: '["Linux", "amdgpu"]'
2422
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build
25-
extra_image_opts: --device=/dev/kfd
26-
extra_cmake_args: -DHIP_PLATFORM="AMD" -DAMD_ARCH="gfx1031"
23+
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
2724
target_devices: ext_oneapi_hip:gpu
28-
reset_gpu: false
2925

30-
- name: Intel
26+
- name: Intel L0 GPU
3127
runner: '["Linux", "gen12"]'
3228
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:latest
33-
extra_image_opts:
34-
extra_cmake_args:
35-
target_devices: ext_oneapi_level_zero:gpu;opencl:gpu;opencl:cpu
29+
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
30+
target_devices: ext_oneapi_level_zero:gpu
3631
reset_gpu: true
3732

33+
- name: Intel OCL GPU
34+
runner: '["Linux", "gen12"]'
35+
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:latest
36+
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
37+
target_devices: opencl:gpu
38+
reset_gpu: true
39+
40+
- name: OCL CPU
41+
runner: '["Linux", "x86-cpu"]'
42+
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:latest
43+
image_options: -u 1001
44+
target_devices: opencl:cpu
45+
3846
- name: ESIMD Emu
3947
runner: '["Linux", "x86-cpu"]'
4048
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:latest
41-
extra_image_opts:
42-
extra_cmake_args:
49+
image_options: -u 1001
4350
target_devices: ext_intel_esimd_emulator:gpu
44-
reset_gpu: false
45-
uses: ./.github/workflows/linux_single_e2e.yml
51+
52+
- name: Self-hosted CUDA
53+
runner: '["Linux", "cuda"]'
54+
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build
55+
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN
56+
target_devices: ext_oneapi_cuda:gpu
57+
uses: ./.github/workflows/sycl_linux_run_tests.yml
4658
with:
4759
name: ${{ matrix.name }}
4860
runner: ${{ matrix. runner }}
4961
image: ${{ matrix.image }}
50-
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN ${{ matrix.extra_image_opts }}
51-
extra_cmake_args: ${{ matrix.extra_cmake_args }}
62+
image_options: ${{ matrix.image_options }}
5263
target_devices: ${{ matrix.target_devices }}
53-
ref: ${{ inputs.ref }}
5464
reset_gpu: ${{ matrix.reset_gpu }}
55-
# TODO: should we do the merge?
65+
env: ${{ inputs.env }}
66+
ref: ${{ github.sha }}
5667
merge_ref: ''
5768

5869
aws_start:
@@ -61,22 +72,20 @@ jobs:
6172
secrets: inherit
6273
with:
6374
mode: start
64-
runs-on-list: '[{"runs-on":"aws-cuda_${{ inputs.uniq }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]'
75+
runs-on-list: '[{"runs-on":"aws-cuda_${{ github.run_id }}-${{ github.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]'
6576

6677
linux_e2e_on_nightly_aws:
6778
name: '[AWS][CUDA] E2E on Nightly'
6879
needs: [aws_start]
69-
uses: ./.github/workflows/linux_single_e2e.yml
80+
uses: ./.github/workflows/sycl_linux_run_tests.yml
7081
with:
7182
name: CUDA
72-
runner: '["aws-cuda_${{ inputs.uniq }}"]'
83+
runner: '["aws-cuda_${{ github.run_id }}-${{ github.run_attempt }}"]'
7384
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build
74-
image_options: --device=/dev/dri --privileged --cap-add SYS_ADMIN --gpus all
75-
extra_cmake_args:
76-
target_devices: all
77-
ref: ${{ inputs.ref }}
78-
reset_gpu: false
79-
# TODO: should we do the merge?
85+
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN
86+
target_devices: ext_oneapi_cuda:gpu
87+
env: ${{ inputs.env }}
88+
ref: ${{ github.sha }}
8089
merge_ref: ''
8190

8291
aws_stop:
@@ -87,4 +96,4 @@ jobs:
8796
secrets: inherit
8897
with:
8998
mode: stop
90-
runs-on-list: '[{"runs-on":"aws-cuda_${{ inputs.uniq }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]'
99+
runs-on-list: '[{"runs-on":"aws-cuda_${{ github.run_id }}-${{ github.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]'

.github/workflows/sycl_detect_changes.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
# devops/* contains config files, including drivers versions.
5353
# Allow them to be tested in pre-commit.
5454
- devops/*/**
55+
drivers:
56+
- devops/dependencies.json
5557
5658
- name: Set output
5759
id: result
Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
name: Reusable SYCL Linux build workflow
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
cc:
7+
type: string
8+
required: false
9+
default: "gcc"
10+
cxx:
11+
type: string
12+
required: false
13+
default: "g++"
14+
build_image:
15+
type: string
16+
required: false
17+
default: "ghcr.io/intel/llvm/ubuntu2204_build:latest"
18+
build_ref:
19+
type: string
20+
required: false
21+
build_cache_root:
22+
type: string
23+
required: true
24+
build_cache_suffix:
25+
type: string
26+
required: false
27+
default: "default"
28+
build_configure_extra_args:
29+
type: string
30+
required: false
31+
default: "--hip --cuda --enable-esimd-emulator"
32+
build_artifact_suffix:
33+
type: string
34+
required: true
35+
artifact_archive_name:
36+
type: string
37+
default: llvm_sycl.tar.zst
38+
changes:
39+
type: string
40+
description: 'Filter matches for the changed files in the PR'
41+
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
42+
required: false
43+
merge_ref:
44+
description: |
45+
Commit-ish to merge post-checkout if non-empty. Must be reachable from
46+
the default_branch input paramter.
47+
type: string
48+
default: 'FETCH_HEAD'
49+
retention-days:
50+
description: 'Artifacts retention period'
51+
type: string
52+
default: 3
53+
54+
outputs:
55+
build_conclusion:
56+
value: ${{ jobs.build.outputs.build_conclusion }}
57+
artifact_archive_name:
58+
value: ${{ jobs.build.outputs.artifact_archive_name }}
59+
artifact_decompress_command:
60+
value: ${{ jobs.build.outputs.artifact_decompress_command }}
61+
62+
workflow_dispatch:
63+
inputs:
64+
changes:
65+
description: 'Filter matches for the changed files in the PR'
66+
type: choice
67+
options:
68+
- "[]"
69+
- '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
70+
build_image:
71+
type: choice
72+
options:
73+
- "ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build"
74+
cc:
75+
type: choice
76+
options:
77+
- gcc
78+
cxx:
79+
type: choice
80+
options:
81+
- g++
82+
build_configure_extra_args:
83+
type: choice
84+
options:
85+
- "--hip --cuda --enable-esimd-emulator"
86+
# Cache properties need to match CC/CXX/CMake opts. Any additional choices
87+
# would need extra care.
88+
build_cache_root:
89+
type: choice
90+
options:
91+
- "/__w/"
92+
build_cache_suffix:
93+
type: choice
94+
options:
95+
- "default"
96+
97+
build_artifact_suffix:
98+
type: choice
99+
options:
100+
- "default"
101+
retention-days:
102+
type: choice
103+
options:
104+
- 3
105+
106+
jobs:
107+
build:
108+
name: Build + LIT
109+
runs-on: [Linux, build]
110+
container:
111+
image: ${{ inputs.build_image }}
112+
options: -u 1001:1001
113+
outputs:
114+
build_conclusion: ${{ steps.build.conclusion }}
115+
artifact_archive_name: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
116+
artifact_decompress_command: ${{ steps.artifact_info.outputs.DECOMPRESS }}
117+
env:
118+
CCACHE_DIR: ${{ inputs.build_cache_root }}/build_cache_${{ inputs.build_cache_suffix }}
119+
CCACHE_MAXSIZE: 8G
120+
steps:
121+
- name: Deduce artifact archive params
122+
# To reduce number of inputs parameters that is limited for manual triggers.
123+
id: artifact_info
124+
run: |
125+
NAME="${{inputs.artifact_archive_name}}"
126+
if [ -z "$NAME" ]; then
127+
NAME=llvm_sycl.tar.zst
128+
fi
129+
echo ARCHIVE_NAME="$NAME" >> $GITHUB_OUTPUT
130+
if [ "${NAME}" != "${NAME%.tar.gz}" ]; then
131+
echo COMPRESS="gzip" >> $GITHUB_OUTPUT
132+
echo DECOMPRESS="gunzip" >> $GITHUB_OUTPUT
133+
elif [ "${NAME}" != "${NAME%.tar.zst}" ]; then
134+
echo COMPRESS="zstd -9" >> $GITHUB_OUTPUT
135+
echo DECOMPRESS="zstd" >> $GITHUB_OUTPUT
136+
else
137+
echo "Unsupported extension"
138+
exit 1
139+
fi
140+
- uses: actions/checkout@v3
141+
with:
142+
sparse-checkout: |
143+
devops/actions
144+
# Cleanup will be run after all actions are completed.
145+
- name: Register cleanup after job is finished
146+
uses: ./devops/actions/cleanup
147+
- uses: ./devops/actions/cached_checkout
148+
with:
149+
path: src
150+
ref: ${{ inputs.build_ref || github.sha }}
151+
merge_ref: ${{ inputs.merge_ref }}
152+
cache_path: "/__w/repo_cache/"
153+
- name: Configure
154+
env:
155+
CC: ${{ inputs.cc }}
156+
CXX: ${{ inputs.cxx }}
157+
ARGS: ${{ inputs.build_configure_extra_args }}
158+
CUDA_LIB_PATH: "/usr/local/cuda/lib64/stubs"
159+
run: |
160+
mkdir -p $CCACHE_DIR
161+
mkdir -p $GITHUB_WORKSPACE/build
162+
cd $GITHUB_WORKSPACE/build
163+
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
164+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
165+
--ci-defaults $ARGS \
166+
--cmake-opt=-DCMAKE_C_COMPILER_LAUNCHER=ccache \
167+
--cmake-opt=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
168+
--cmake-opt="-DLLVM_INSTALL_UTILS=ON" \
169+
--cmake-opt="-DSYCL_PI_TESTS=OFF"
170+
- name: Compile
171+
id: build
172+
run: cmake --build $GITHUB_WORKSPACE/build
173+
- name: check-llvm
174+
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
175+
run: |
176+
cmake --build $GITHUB_WORKSPACE/build --target check-llvm
177+
- name: check-clang
178+
if: always() && !cancelled() && contains(inputs.changes, 'clang')
179+
run: |
180+
# Can we move this to Dockerfile? Hopefully, noop on Windows.
181+
export XDG_CACHE_HOME=$GITHUB_WORKSPACE/os_cache
182+
cmake --build $GITHUB_WORKSPACE/build --target check-clang
183+
- name: check-sycl
184+
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
185+
run: |
186+
# TODO consider moving this to Dockerfile.
187+
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
188+
cmake --build $GITHUB_WORKSPACE/build --target check-sycl
189+
- name: check-llvm-spirv
190+
if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv')
191+
run: |
192+
cmake --build $GITHUB_WORKSPACE/build --target check-llvm-spirv
193+
- name: check-xptifw
194+
if: always() && !cancelled() && contains(inputs.changes, 'xptifw')
195+
run: |
196+
cmake --build $GITHUB_WORKSPACE/build --target check-xptifw
197+
- name: check-libclc
198+
if: always() && !cancelled() && contains(inputs.changes, 'libclc')
199+
run: |
200+
cmake --build $GITHUB_WORKSPACE/build --target check-libclc
201+
- name: check-libdevice
202+
if: always() && !cancelled() && contains(inputs.changes, 'libdevice')
203+
run: |
204+
cmake --build $GITHUB_WORKSPACE/build --target check-libdevice
205+
- name: Install
206+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
207+
# TODO replace utility installation with a single CMake target
208+
run: |
209+
cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain
210+
cmake --build $GITHUB_WORKSPACE/build --target utils/FileCheck/install
211+
cmake --build $GITHUB_WORKSPACE/build --target utils/count/install
212+
cmake --build $GITHUB_WORKSPACE/build --target utils/not/install
213+
cmake --build $GITHUB_WORKSPACE/build --target utils/lit/install
214+
cmake --build $GITHUB_WORKSPACE/build --target utils/llvm-lit/install
215+
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-size
216+
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-cov
217+
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-profdata
218+
cmake --build $GITHUB_WORKSPACE/build --target install-compiler-rt
219+
- name: Additional Install for "--shared-libs" build
220+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && contains(inputs.build_configure_extra_args, '--shared-libs') }}
221+
run: |
222+
cmake --build $GITHUB_WORKSPACE/build --target install-clang-libraries
223+
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-libraries
224+
225+
- name: Install lint utilities
226+
# We install these into our nightly container that CI uses to run lint
227+
# checks.
228+
run: |
229+
cmake --build $GITHUB_WORKSPACE/build --target install-clang-format
230+
cmake --build $GITHUB_WORKSPACE/build --target install-clang-tidy
231+
232+
- name: Pack toolchain
233+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
234+
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .
235+
- name: Upload toolchain
236+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
237+
uses: actions/upload-artifact@v3
238+
with:
239+
name: sycl_linux_${{ inputs.build_artifact_suffix }}
240+
path: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
241+
retention-days: ${{ inputs.retention-days }}

0 commit comments

Comments
 (0)