Skip to content

Commit 9a2a94d

Browse files
authored
Merge branch 'sycl' into llvmspirv_pulldown
2 parents c8034f5 + 9f81215 commit 9a2a94d

File tree

235 files changed

+5248
-3838
lines changed

Some content is hidden

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

235 files changed

+5248
-3838
lines changed

.github/workflows/coverity.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ jobs:
4646
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
4747
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
4848
--ci-defaults --hip --cuda \
49-
-DNATIVECPU_USE_OCK=Off \
50-
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV
49+
-DNATIVECPU_USE_OCK=Off
5150
5251
- name: Build with coverity
5352
run: $GITHUB_WORKSPACE/cov-analysis-linux64-*/bin/cov-build --dir cov-int cmake --build $GITHUB_WORKSPACE/build --target sycl-toolchain

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

Lines changed: 70 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Reusable SYCL Linux build workflow
22

3+
defaults:
4+
run:
5+
shell: bash
6+
37
on:
48
workflow_call:
59
inputs:
@@ -29,39 +33,54 @@ on:
2933
type: string
3034
required: false
3135
default: "--hip --cuda --native_cpu"
32-
build_artifact_suffix:
33-
type: string
34-
required: true
3536
build_target:
3637
type: string
3738
required: false
3839
default: sycl-toolchain
39-
artifact_archive_name:
40-
type: string
41-
default: llvm_sycl.tar.zst
40+
4241
changes:
4342
type: string
4443
description: 'Filter matches for the changed files in the PR'
4544
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc]'
4645
required: false
46+
47+
# Artifacts:
48+
4749
retention-days:
4850
description: 'Artifacts retention period'
4951
type: string
5052
default: 3
53+
54+
toolchain_artifact:
55+
type: string
56+
required: true
57+
toolchain_artifact_filename:
58+
type: string
59+
default: llvm_sycl.tar.zst
60+
61+
pack_release:
62+
type: string
63+
required: false
64+
5165
e2e_binaries_artifact:
5266
type: string
5367
required: false
54-
pack_release:
68+
e2e_binaries_spirv_backend_artifact:
69+
type: string
70+
required: false
71+
e2e_binaries_preview_artifact:
5572
type: string
5673
required: false
5774

5875
outputs:
5976
build_conclusion:
6077
value: ${{ jobs.build.outputs.build_conclusion }}
61-
artifact_archive_name:
62-
value: ${{ jobs.build.outputs.artifact_archive_name }}
63-
artifact_decompress_command:
64-
value: ${{ jobs.build.outputs.artifact_decompress_command }}
78+
toolchain_artifact:
79+
value: ${{ inputs.toolchain_artifact }}
80+
toolchain_artifact_filename:
81+
value: ${{ jobs.build.outputs.toolchain_artifact_filename }}
82+
toolchain_decompress_command:
83+
value: ${{ jobs.build.outputs.toolchain_decompress_command }}
6584

6685
workflow_dispatch:
6786
inputs:
@@ -98,10 +117,10 @@ on:
98117
options:
99118
- "default"
100119

101-
build_artifact_suffix:
120+
toolchain_artifact:
102121
type: choice
103122
options:
104-
- "default"
123+
- "sycl_linux_default"
105124
retention-days:
106125
type: choice
107126
options:
@@ -122,8 +141,8 @@ jobs:
122141
options: -u 1001:1001
123142
outputs:
124143
build_conclusion: ${{ steps.build.conclusion }}
125-
artifact_archive_name: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
126-
artifact_decompress_command: ${{ steps.artifact_info.outputs.DECOMPRESS }}
144+
toolchain_artifact_filename: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
145+
toolchain_decompress_command: ${{ steps.artifact_info.outputs.DECOMPRESS }}
127146
env:
128147
CCACHE_DIR: ${{ inputs.build_cache_root }}/build_cache_${{ inputs.build_cache_suffix }}
129148
CCACHE_MAXSIZE: 8G
@@ -132,7 +151,7 @@ jobs:
132151
# To reduce number of inputs parameters that is limited for manual triggers.
133152
id: artifact_info
134153
run: |
135-
NAME="${{inputs.artifact_archive_name}}"
154+
NAME="${{inputs.toolchain_artifact_filename}}"
136155
if [ -z "$NAME" ]; then
137156
NAME=llvm_sycl.tar.zst
138157
fi
@@ -163,6 +182,10 @@ jobs:
163182
if: ${{ inputs.cc == 'icx' || inputs.cxx == 'icpx' }}
164183
uses: ./devops/actions/setup_linux_oneapi_env
165184
- name: Configure
185+
# Setting `CMAKE_INSTALL_PREFIX` is important because that's the location
186+
# where `sycl-linux-run-tests.yml` unpacks the toolchain to. That location
187+
# *must* match between build-only and run-only E2E tests runs and we might
188+
# be creating pre-built E2E tests' binaries in this workflow.
166189
env:
167190
CC: ${{ inputs.cc }}
168191
CXX: ${{ inputs.cxx }}
@@ -172,26 +195,42 @@ jobs:
172195
mkdir -p $GITHUB_WORKSPACE/build
173196
cd $GITHUB_WORKSPACE/build
174197
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
175-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
198+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build \
199+
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/toolchain \
200+
-t Release \
176201
--ci-defaults ${{ inputs.build_configure_extra_args }} \
177202
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
178203
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
179204
-DLLVM_INSTALL_UTILS=ON \
180-
-DNATIVECPU_USE_OCK=Off \
181-
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV
205+
-DNATIVECPU_USE_OCK=Off
182206
- name: Compile
183207
id: build
184208
# Emulate default value for manual dispatch as we've run out of available arguments.
185209
run: cmake --build $GITHUB_WORKSPACE/build --target ${{ inputs.build_target || 'sycl-toolchain' }}
186210
- name: check-llvm
187211
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
212+
env:
213+
# Can't inline to support possible quotes inside:
214+
BUILD_CONFIGURE_EXTRA_ARGS: ${{ inputs.build_configure_extra_args }}
188215
run: |
216+
if [[ "${BUILD_CONFIGURE_EXTRA_ARGS}" == *"--use-libcxx"* ]]; then
217+
# https://github.com/llvm/llvm-project/issues/59429
218+
export LIT_FILTER_OUT="ExecutionEngine/MCJIT"
219+
fi
220+
189221
cmake --build $GITHUB_WORKSPACE/build --target check-llvm
190222
- name: check-clang
191223
if: always() && !cancelled() && contains(inputs.changes, 'clang')
224+
env:
225+
# Can't inline to support possible quotes inside:
226+
BUILD_CONFIGURE_EXTRA_ARGS: ${{ inputs.build_configure_extra_args }}
192227
run: |
193228
# Can we move this to Dockerfile? Hopefully, noop on Windows.
194229
export XDG_CACHE_HOME=$GITHUB_WORKSPACE/os_cache
230+
if [[ "${BUILD_CONFIGURE_EXTRA_ARGS}" == *"--use-libcxx"* ]]; then
231+
# https://github.com/llvm/llvm-project/issues/59428
232+
export LIT_FILTER_OUT="(E|e)xception"
233+
fi
195234
cmake --build $GITHUB_WORKSPACE/build --target check-clang
196235
- name: check-sycl
197236
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
@@ -234,7 +273,7 @@ jobs:
234273
235274
- name: Pack toolchain release
236275
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
237-
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .
276+
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/toolchain .
238277
- name: Upload toolchain release
239278
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
240279
uses: actions/upload-artifact@v4
@@ -264,24 +303,20 @@ jobs:
264303
265304
- name: Pack toolchain
266305
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
267-
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .
306+
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/toolchain .
268307
- name: Upload toolchain
269308
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
270309
uses: actions/upload-artifact@v4
271310
with:
272-
name: sycl_linux_${{ inputs.build_artifact_suffix }}
311+
name: ${{ inputs.toolchain_artifact }}
273312
path: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
274313
retention-days: ${{ inputs.retention-days }}
275314

276-
- name: Copy toolchain
277-
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
278-
# We must have the compiler in the same location as it will be in the E2E
279-
# run-tests job.
280-
run: cp -r $GITHUB_WORKSPACE/build/install $GITHUB_WORKSPACE/toolchain
281315

282316
- name: Source OneAPI TBB vars.sh
283-
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
284-
shell: bash
317+
# Tasks that use the just built toolchain below, need extra environment
318+
# setup. No harm in it if all of those tasks would get skipped.
319+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
285320
run: |
286321
# https://github.com/actions/runner/issues/1964 prevents us from using
287322
# the ENTRYPOINT in the image.
@@ -309,31 +344,31 @@ jobs:
309344
extra_lit_opts: --param sycl_build_targets="spir;nvidia;amd"
310345

311346
- name: Remove E2E tests before spirv-backend run
312-
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
347+
if: ${{ inputs.e2e_binaries_spirv_backend_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
313348
run: rm -rf build-e2e
314349

315350
- name: Build E2E tests with SPIR-V Backend
316-
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
351+
if: ${{ inputs.e2e_binaries_spirv_backend_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
317352
uses: ./devops/actions/run-tests/e2e
318353
with:
319354
ref: ${{ inputs.ref || github.sha }}
320355
testing_mode: build-only
321356
target_devices: all
322-
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}_spirv_backend
357+
binaries_artifact: ${{ inputs.e2e_binaries_spirv_backend_artifact }}
323358
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
324359
extra_lit_opts: --param spirv-backend=True
325360

326361
- name: Remove E2E tests before preview-mode run
327-
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
362+
if: ${{ inputs.e2e_binaries_preview_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
328363
run: rm -rf build-e2e
329364

330365
- name: Build E2E tests in Preview Mode
331-
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
366+
if: ${{ inputs.e2e_binaries_preview_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
332367
uses: ./devops/actions/run-tests/e2e
333368
with:
334369
ref: ${{ inputs.ref || github.sha }}
335370
testing_mode: build-only
336371
target_devices: all
337-
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}_preview
372+
binaries_artifact: ${{ inputs.e2e_binaries_preview_artifact }}
338373
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
339374
extra_lit_opts: --param test-preview-mode=True

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ jobs:
7373
# pre-commit workflow.
7474
repo_ref: ${{ github.event.workflow_run.referenced_workflows[0].sha }}
7575

76-
sycl_toolchain_artifact: sycl_linux_default
77-
sycl_toolchain_archive: llvm_sycl.tar.zst
78-
sycl_toolchain_decompress_command: zstd
76+
toolchain_artifact: sycl_linux_default
77+
toolchain_artifact_filename: llvm_sycl.tar.zst
78+
toolchain_decompress_command: zstd
7979

8080
update-check:
8181
needs: [create-check, e2e-cuda]

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

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,17 @@ jobs:
5050
with:
5151
build_ref: ${{ github.sha }}
5252
build_cache_root: "/__w/"
53-
build_artifact_suffix: "default"
5453
build_cache_suffix: "default"
5554
# Docker image has last nightly pre-installed and added to the PATH
5655
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
5756
cc: clang
5857
cxx: clang++
5958
changes: ${{ needs.detect_changes.outputs.filters }}
60-
e2e_binaries_artifact: sycl_e2e_bin_default
59+
60+
toolchain_artifact: sycl_linux_default
61+
e2e_binaries_artifact: e2e_bin
62+
e2e_binaries_spirv_backend_artifact: e2e_bin_spirv_backend
63+
e2e_binaries_preview_artifact: e2e_bin_preview
6164

6265
# If a PR changes CUDA adapter, run the build on Ubuntu 22.04 as well.
6366
# Ubuntu 22.04 container has CUDA 12.1 installed while Ubuntu 24.0 image
@@ -70,11 +73,12 @@ jobs:
7073
with:
7174
build_ref: ${{ github.sha }}
7275
build_cache_root: "/__w/"
73-
build_artifact_suffix: "ubuntu22"
7476
build_cache_suffix: "ubuntu22"
7577
build_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"
7678
changes: ${{ needs.detect_changes.outputs.filters }}
7779

80+
toolchain_artifact: sycl_linux_ubuntu22
81+
7882
run_prebuilt_e2e_tests:
7983
needs: [build, detect_changes]
8084
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
@@ -129,13 +133,13 @@ jobs:
129133
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
130134
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
131135
extra_lit_opts: --param spirv-backend=True
132-
e2e_binaries_artifact: sycl_e2e_bin_default_spirv_backend
136+
e2e_binaries_artifact: e2e_bin_spirv_backend
133137
- name: Preview Mode
134138
runner: '["Linux", "gen12"]'
135139
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
136140
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
137141
extra_lit_opts: --param test-preview-mode=True
138-
e2e_binaries_artifact: sycl_e2e_bin_default_preview
142+
e2e_binaries_artifact: e2e_bin_preview
139143

140144
uses: ./.github/workflows/sycl-linux-run-tests.yml
141145
with:
@@ -146,10 +150,10 @@ jobs:
146150
target_devices: ${{ matrix.target_devices }}
147151
extra_lit_opts: ${{ matrix.extra_lit_opts }}
148152
repo_ref: ${{ github.sha }}
149-
sycl_toolchain_artifact: sycl_linux_default
150-
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
151-
sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }}
152-
e2e_binaries_artifact: ${{ matrix.e2e_binaries_artifact || 'sycl_e2e_bin_default' }}
153+
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
154+
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
155+
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}
156+
e2e_binaries_artifact: ${{ matrix.e2e_binaries_artifact || 'e2e_bin' }}
153157
e2e_testing_mode: 'run-only'
154158

155159
# Do not install drivers on AMD and CUDA runners.
@@ -185,9 +189,9 @@ jobs:
185189
benchmark_preset: 'Minimal'
186190
benchmark_dry_run: true
187191
repo_ref: ${{ github.sha }}
188-
sycl_toolchain_artifact: sycl_linux_default
189-
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
190-
sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }}
192+
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
193+
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
194+
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}
191195

192196
test-perf:
193197
needs: [build, detect_changes]
@@ -224,6 +228,6 @@ jobs:
224228

225229
repo_ref: ${{ github.sha }}
226230

227-
sycl_toolchain_artifact: sycl_linux_default
228-
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
229-
sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }}
231+
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
232+
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
233+
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}

0 commit comments

Comments
 (0)