Skip to content

Commit e4dd31b

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into flamegraphs
Signed-off-by: Mateusz P. Nowak <[email protected]>
2 parents a51c767 + 1af67b1 commit e4dd31b

File tree

187 files changed

+4204
-2794
lines changed

Some content is hidden

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

187 files changed

+4204
-2794
lines changed

.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-linux-build.yml

Lines changed: 67 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,58 @@ on:
3333
type: string
3434
required: false
3535
default: "--hip --cuda --native_cpu"
36-
build_artifact_suffix:
37-
type: string
38-
required: true
3936
build_target:
4037
type: string
4138
required: false
4239
default: sycl-toolchain
43-
artifact_archive_name:
44-
type: string
45-
default: llvm_sycl.tar.zst
40+
4641
changes:
4742
type: string
4843
description: 'Filter matches for the changed files in the PR'
4944
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc]'
5045
required: false
46+
47+
# Artifacts:
48+
5149
retention-days:
5250
description: 'Artifacts retention period'
5351
type: string
5452
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+
5569
e2e_binaries_artifact:
5670
type: string
5771
required: false
58-
pack_release:
72+
e2e_binaries_spirv_backend_artifact:
73+
type: string
74+
required: false
75+
e2e_binaries_preview_artifact:
5976
type: string
6077
required: false
6178

6279
outputs:
6380
build_conclusion:
6481
value: ${{ jobs.build.outputs.build_conclusion }}
65-
artifact_archive_name:
66-
value: ${{ jobs.build.outputs.artifact_archive_name }}
67-
artifact_decompress_command:
68-
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 }}
6988

7089
workflow_dispatch:
7190
inputs:
@@ -102,18 +121,15 @@ on:
102121
options:
103122
- "default"
104123

105-
build_artifact_suffix:
106-
type: choice
107-
options:
108-
- "default"
109124
retention-days:
110125
type: choice
111126
options:
112127
- 3
113128

114-
pack_release:
115-
type: string
116-
required: false
129+
toolchain_artifact:
130+
type: choice
131+
options:
132+
- "sycl_linux_default"
117133

118134
permissions: read-all
119135

@@ -126,8 +142,8 @@ jobs:
126142
options: -u 1001:1001
127143
outputs:
128144
build_conclusion: ${{ steps.build.conclusion }}
129-
artifact_archive_name: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
130-
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 }}
131147
env:
132148
CCACHE_DIR: ${{ inputs.build_cache_root }}/build_cache_${{ inputs.build_cache_suffix }}
133149
CCACHE_MAXSIZE: 8G
@@ -136,7 +152,7 @@ jobs:
136152
# To reduce number of inputs parameters that is limited for manual triggers.
137153
id: artifact_info
138154
run: |
139-
NAME="${{inputs.artifact_archive_name}}"
155+
NAME="${{inputs.toolchain_artifact_filename}}"
140156
if [ -z "$NAME" ]; then
141157
NAME=llvm_sycl.tar.zst
142158
fi
@@ -167,6 +183,10 @@ jobs:
167183
if: ${{ inputs.cc == 'icx' || inputs.cxx == 'icpx' }}
168184
uses: ./devops/actions/setup_linux_oneapi_env
169185
- 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.
170190
env:
171191
CC: ${{ inputs.cc }}
172192
CXX: ${{ inputs.cxx }}
@@ -176,7 +196,9 @@ jobs:
176196
mkdir -p $GITHUB_WORKSPACE/build
177197
cd $GITHUB_WORKSPACE/build
178198
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
179-
-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 \
180202
--ci-defaults ${{ inputs.build_configure_extra_args }} \
181203
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
182204
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
@@ -188,19 +210,25 @@ jobs:
188210
run: cmake --build $GITHUB_WORKSPACE/build --target ${{ inputs.build_target || 'sycl-toolchain' }}
189211
- name: check-llvm
190212
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 }}
191216
run: |
192-
if [[ "${{ inputs.build_configure_extra_args }}" == *"--use-libcxx"* ]]; then
217+
if [[ "${BUILD_CONFIGURE_EXTRA_ARGS}" == *"--use-libcxx"* ]]; then
193218
# https://github.com/llvm/llvm-project/issues/59429
194219
export LIT_FILTER_OUT="ExecutionEngine/MCJIT"
195220
fi
196221
197222
cmake --build $GITHUB_WORKSPACE/build --target check-llvm
198223
- name: check-clang
199224
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 }}
200228
run: |
201229
# Can we move this to Dockerfile? Hopefully, noop on Windows.
202230
export XDG_CACHE_HOME=$GITHUB_WORKSPACE/os_cache
203-
if [[ "${{ inputs.build_configure_extra_args }}" == *"--use-libcxx"* ]]; then
231+
if [[ "${BUILD_CONFIGURE_EXTRA_ARGS}" == *"--use-libcxx"* ]]; then
204232
# https://github.com/llvm/llvm-project/issues/59428
205233
export LIT_FILTER_OUT="(E|e)xception"
206234
fi
@@ -245,13 +273,13 @@ jobs:
245273
cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain
246274
247275
- name: Pack toolchain release
248-
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
249-
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 .
250278
- name: Upload toolchain release
251-
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
279+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.release_toolchain_artifact != '' }}
252280
uses: actions/upload-artifact@v4
253281
with:
254-
name: sycl_linux_release
282+
name: ${{ inputs.release_toolchain_artifact }}
255283
path: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
256284
retention-days: ${{ inputs.retention-days }}
257285

@@ -276,23 +304,20 @@ jobs:
276304
277305
- name: Pack toolchain
278306
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
279-
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 .
280308
- name: Upload toolchain
281309
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
282310
uses: actions/upload-artifact@v4
283311
with:
284-
name: sycl_linux_${{ inputs.build_artifact_suffix }}
312+
name: ${{ inputs.toolchain_artifact }}
285313
path: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
286314
retention-days: ${{ inputs.retention-days }}
287315

288-
- name: Copy toolchain
289-
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
290-
# We must have the compiler in the same location as it will be in the E2E
291-
# run-tests job.
292-
run: cp -r $GITHUB_WORKSPACE/build/install $GITHUB_WORKSPACE/toolchain
293316

294317
- name: Source OneAPI TBB vars.sh
295-
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
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' }}
296321
run: |
297322
# https://github.com/actions/runner/issues/1964 prevents us from using
298323
# the ENTRYPOINT in the image.
@@ -320,31 +345,31 @@ jobs:
320345
extra_lit_opts: --param sycl_build_targets="spir;nvidia;amd"
321346

322347
- name: Remove E2E tests before spirv-backend run
323-
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' }}
324349
run: rm -rf build-e2e
325350

326351
- name: Build E2E tests with SPIR-V Backend
327-
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' }}
328353
uses: ./devops/actions/run-tests/e2e
329354
with:
330355
ref: ${{ inputs.ref || github.sha }}
331356
testing_mode: build-only
332357
target_devices: all
333-
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}_spirv_backend
358+
binaries_artifact: ${{ inputs.e2e_binaries_spirv_backend_artifact }}
334359
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
335360
extra_lit_opts: --param spirv-backend=True
336361

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

341366
- name: Build E2E tests in Preview Mode
342-
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
367+
if: ${{ inputs.e2e_binaries_preview_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
343368
uses: ./devops/actions/run-tests/e2e
344369
with:
345370
ref: ${{ inputs.ref || github.sha }}
346371
testing_mode: build-only
347372
target_devices: all
348-
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}_preview
373+
binaries_artifact: ${{ inputs.e2e_binaries_preview_artifact }}
349374
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
350375
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: 20 additions & 16 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' }}
@@ -123,19 +127,19 @@ jobs:
123127
- name: Intel Battlemage Graphics
124128
runner: '["Linux", "bmg"]'
125129
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
126-
target_devices: level_zero:gpu;level_zero_v2:gpu
130+
target_devices: level_zero_v1:gpu;level_zero_v2:gpu
127131
- name: SPIR-V Backend / Intel Battlemage Graphics
128132
runner: '["Linux", "bmg"]'
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)