Skip to content

Commit 8c87679

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into llvmspirv_pulldown
2 parents b977937 + 521114d commit 8c87679

File tree

882 files changed

+20904
-8647
lines changed

Some content is hidden

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

882 files changed

+20904
-8647
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/libcxx-check-generated-files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616

1717
- name: Install dependencies
18-
uses: aminya/setup-cpp@004edc19527a83d56cda032658aab55c5e2ed48f # v1.7.0
18+
uses: aminya/setup-cpp@a276e6e3d1db9160db5edc458e99a30d3b109949 # v1.7.1
1919
with:
2020
clangformat: 17.0.1
2121
ninja: true

.github/workflows/pr-code-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
echo "$CHANGED_FILES"
5656
5757
- name: Install clang-format
58-
uses: aminya/setup-cpp@004edc19527a83d56cda032658aab55c5e2ed48f # v1.7.0
58+
uses: aminya/setup-cpp@a276e6e3d1db9160db5edc458e99a30d3b109949 # v1.7.1
5959
with:
6060
clangformat: 20.1.5
6161

.github/workflows/release-lit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions
4646
4747
- name: Setup Cpp
48-
uses: aminya/setup-cpp@004edc19527a83d56cda032658aab55c5e2ed48f # v1.7.0
48+
uses: aminya/setup-cpp@a276e6e3d1db9160db5edc458e99a30d3b109949 # v1.7.1
4949
with:
5050
compiler: llvm-16.0.6
5151
cmake: true

.github/workflows/sycl-detect-changes.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
- *libclc
5555
- 'sycl/*'
5656
- 'sycl/!(test-e2e|doc)/**'
57+
- 'libdevice/**'
5758
ci:
5859
- .github/workflows/**
5960
# devops/* contains config files, including drivers versions.
@@ -64,6 +65,8 @@ jobs:
6465
- devops/scripts/install_drivers.sh
6566
devigccfg:
6667
- devops/dependencies-igc-dev.json
68+
benchmarks:
69+
- 'devops/scripts/benchmarks/**'
6770
perf-tests:
6871
- sycl/test-e2e/PerformanceTests/**
6972
esimd:

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

Lines changed: 82 additions & 46 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,58 @@ 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'
45-
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
44+
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+
release_toolchain_artifact:
62+
type: string
63+
required: false
64+
description: |
65+
If provided, create an additional toolchain artifact without utilities
66+
used for testing in it. File name of the archive is the same as in the
67+
`toolchain_artifact` above.
68+
5169
e2e_binaries_artifact:
5270
type: string
5371
required: false
54-
pack_release:
72+
e2e_binaries_spirv_backend_artifact:
73+
type: string
74+
required: false
75+
e2e_binaries_preview_artifact:
5576
type: string
5677
required: false
5778

5879
outputs:
5980
build_conclusion:
6081
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 }}
82+
toolchain_artifact:
83+
value: ${{ inputs.toolchain_artifact }}
84+
toolchain_artifact_filename:
85+
value: ${{ jobs.build.outputs.toolchain_artifact_filename }}
86+
toolchain_decompress_command:
87+
value: ${{ jobs.build.outputs.toolchain_decompress_command }}
6588

6689
workflow_dispatch:
6790
inputs:
@@ -70,7 +93,7 @@ on:
7093
type: choice
7194
options:
7295
- "[]"
73-
- '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
96+
- '[llvm, clang, sycl, llvm_spirv, xptifw, libclc]'
7497
build_image:
7598
type: choice
7699
options:
@@ -98,18 +121,15 @@ on:
98121
options:
99122
- "default"
100123

101-
build_artifact_suffix:
102-
type: choice
103-
options:
104-
- "default"
105124
retention-days:
106125
type: choice
107126
options:
108127
- 3
109128

110-
pack_release:
111-
type: string
112-
required: false
129+
toolchain_artifact:
130+
type: choice
131+
options:
132+
- "sycl_linux_default"
113133

114134
permissions: read-all
115135

@@ -122,8 +142,8 @@ jobs:
122142
options: -u 1001:1001
123143
outputs:
124144
build_conclusion: ${{ steps.build.conclusion }}
125-
artifact_archive_name: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
126-
artifact_decompress_command: ${{ steps.artifact_info.outputs.DECOMPRESS }}
145+
toolchain_artifact_filename: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
146+
toolchain_decompress_command: ${{ steps.artifact_info.outputs.DECOMPRESS }}
127147
env:
128148
CCACHE_DIR: ${{ inputs.build_cache_root }}/build_cache_${{ inputs.build_cache_suffix }}
129149
CCACHE_MAXSIZE: 8G
@@ -132,7 +152,7 @@ jobs:
132152
# To reduce number of inputs parameters that is limited for manual triggers.
133153
id: artifact_info
134154
run: |
135-
NAME="${{inputs.artifact_archive_name}}"
155+
NAME="${{inputs.toolchain_artifact_filename}}"
136156
if [ -z "$NAME" ]; then
137157
NAME=llvm_sycl.tar.zst
138158
fi
@@ -163,6 +183,10 @@ jobs:
163183
if: ${{ inputs.cc == 'icx' || inputs.cxx == 'icpx' }}
164184
uses: ./devops/actions/setup_linux_oneapi_env
165185
- name: Configure
186+
# Setting `CMAKE_INSTALL_PREFIX` is important because that's the location
187+
# where `sycl-linux-run-tests.yml` unpacks the toolchain to. That location
188+
# *must* match between build-only and run-only E2E tests runs and we might
189+
# be creating pre-built E2E tests' binaries in this workflow.
166190
env:
167191
CC: ${{ inputs.cc }}
168192
CXX: ${{ inputs.cxx }}
@@ -172,26 +196,42 @@ jobs:
172196
mkdir -p $GITHUB_WORKSPACE/build
173197
cd $GITHUB_WORKSPACE/build
174198
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
175-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
199+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build \
200+
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/toolchain \
201+
-t Release \
176202
--ci-defaults ${{ inputs.build_configure_extra_args }} \
177203
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
178204
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
179205
-DLLVM_INSTALL_UTILS=ON \
180-
-DNATIVECPU_USE_OCK=Off \
181-
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV
206+
-DNATIVECPU_USE_OCK=Off
182207
- name: Compile
183208
id: build
184209
# Emulate default value for manual dispatch as we've run out of available arguments.
185210
run: cmake --build $GITHUB_WORKSPACE/build --target ${{ inputs.build_target || 'sycl-toolchain' }}
186211
- name: check-llvm
187212
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
213+
env:
214+
# Can't inline to support possible quotes inside:
215+
BUILD_CONFIGURE_EXTRA_ARGS: ${{ inputs.build_configure_extra_args }}
188216
run: |
217+
if [[ "${BUILD_CONFIGURE_EXTRA_ARGS}" == *"--use-libcxx"* ]]; then
218+
# https://github.com/llvm/llvm-project/issues/59429
219+
export LIT_FILTER_OUT="ExecutionEngine/MCJIT"
220+
fi
221+
189222
cmake --build $GITHUB_WORKSPACE/build --target check-llvm
190223
- name: check-clang
191224
if: always() && !cancelled() && contains(inputs.changes, 'clang')
225+
env:
226+
# Can't inline to support possible quotes inside:
227+
BUILD_CONFIGURE_EXTRA_ARGS: ${{ inputs.build_configure_extra_args }}
192228
run: |
193229
# Can we move this to Dockerfile? Hopefully, noop on Windows.
194230
export XDG_CACHE_HOME=$GITHUB_WORKSPACE/os_cache
231+
if [[ "${BUILD_CONFIGURE_EXTRA_ARGS}" == *"--use-libcxx"* ]]; then
232+
# https://github.com/llvm/llvm-project/issues/59428
233+
export LIT_FILTER_OUT="(E|e)xception"
234+
fi
195235
cmake --build $GITHUB_WORKSPACE/build --target check-clang
196236
- name: check-sycl
197237
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
@@ -218,7 +258,7 @@ jobs:
218258
run: |
219259
cmake --build $GITHUB_WORKSPACE/build --target check-libclc
220260
- name: check-libdevice
221-
if: always() && !cancelled() && contains(inputs.changes, 'libdevice')
261+
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
222262
run: |
223263
cmake --build $GITHUB_WORKSPACE/build --target check-libdevice
224264
- name: Check E2E test requirements
@@ -233,13 +273,13 @@ jobs:
233273
cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain
234274
235275
- name: Pack toolchain release
236-
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+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.release_toolchain_artifact != '' }}
277+
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/toolchain .
238278
- name: Upload toolchain release
239-
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
279+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.release_toolchain_artifact != '' }}
240280
uses: actions/upload-artifact@v4
241281
with:
242-
name: sycl_linux_release
282+
name: ${{ inputs.release_toolchain_artifact }}
243283
path: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
244284
retention-days: ${{ inputs.retention-days }}
245285

@@ -264,24 +304,20 @@ jobs:
264304
265305
- name: Pack toolchain
266306
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 .
307+
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/toolchain .
268308
- name: Upload toolchain
269309
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
270310
uses: actions/upload-artifact@v4
271311
with:
272-
name: sycl_linux_${{ inputs.build_artifact_suffix }}
312+
name: ${{ inputs.toolchain_artifact }}
273313
path: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
274314
retention-days: ${{ inputs.retention-days }}
275315

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
281316

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

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

315351
- name: Build E2E tests with SPIR-V Backend
316-
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
352+
if: ${{ inputs.e2e_binaries_spirv_backend_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
317353
uses: ./devops/actions/run-tests/e2e
318354
with:
319355
ref: ${{ inputs.ref || github.sha }}
320356
testing_mode: build-only
321357
target_devices: all
322-
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}_spirv_backend
358+
binaries_artifact: ${{ inputs.e2e_binaries_spirv_backend_artifact }}
323359
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
324360
extra_lit_opts: --param spirv-backend=True
325361

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

330366
- name: Build E2E tests in Preview Mode
331-
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
367+
if: ${{ inputs.e2e_binaries_preview_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
332368
uses: ./devops/actions/run-tests/e2e
333369
with:
334370
ref: ${{ inputs.ref || github.sha }}
335371
testing_mode: build-only
336372
target_devices: all
337-
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}_preview
373+
binaries_artifact: ${{ inputs.e2e_binaries_preview_artifact }}
338374
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
339375
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]

0 commit comments

Comments
 (0)