Skip to content

Commit cde744c

Browse files
committed
Merge branch 'sycl' of https://github.com/intel/llvm into unify-benchmark-ci
2 parents e330a50 + b23d69e commit cde744c

File tree

370 files changed

+12248
-3380
lines changed

Some content is hidden

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

370 files changed

+12248
-3380
lines changed

.github/CODEOWNERS

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,18 @@ sycl/test-e2e/Adapters/ @intel/unified-runtime-reviewers
6363
sycl/ur_win_proxy_loader @intel/llvm-reviewers-runtime
6464
sycl/test-e2e/Adapters/dll-detach-order.cpp @intel/llvm-reviewers-runtime
6565

66-
# CUDA specific runtime implementations
66+
# CUDA and HIP
6767
sycl/include/sycl/ext/oneapi/experimental/cuda/ @intel/llvm-reviewers-cuda
68-
69-
# CUDA and HIP device code tests
7068
sycl/test/check_device_code/cuda/ @intel/llvm-reviewers-cuda
7169
sycl/test/check_device_code/hip/ @intel/llvm-reviewers-cuda
70+
llvm/include/llvm/SYCLLowerIR/GlobalOffset.h @intel/llvm-reviewers-cuda
71+
llvm/lib/SYCLLowerIR/GlobalOffset.cpp @intel/llvm-reviewers-cuda
72+
llvm/include/llvm/SYCLLowerIR/LocalAccessorToSharedMemory.h @intel/llvm-reviewers-cuda
73+
llvm/lib/SYCLLowerIR/LocalAccessorToSharedMemory.cpp @intel/llvm-reviewers-cuda
74+
llvm/include/llvm/SYCLLowerIR/SYCLCreateNVVMAnnotations.h @intel/llvm-reviewers-cuda
75+
llvm/lib/SYCLLowerIR/SYCLCreateNVVMAnnotations.cpp @intel/llvm-reviewers-cuda
76+
llvm/lib/Target/NVPTX @intel/llvm-reviewers-cuda
77+
llvm/lib/Target/AMDGPU @intel/llvm-reviewers-cuda
7278

7379
# XPTI instrumentation utilities
7480
xpti/ @intel/llvm-reviewers-runtime
@@ -202,3 +208,4 @@ llvm/test/Instrumentation/MemorySanitizer/ @intel/dpcpp-sanitizers-review
202208
llvm/test/Instrumentation/ThreadSanitizer/ @intel/dpcpp-sanitizers-review
203209
sycl/test-e2e/AddressSanitizer/ @intel/dpcpp-sanitizers-review
204210
sycl/test-e2e/MemorySanitizer/ @intel/dpcpp-sanitizers-review
211+
sycl/test-e2e/ThreadSanitizer/ @intel/dpcpp-sanitizers-review

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
fetch-depth: 1
6666
- name: Get subprojects that have doc changes
6767
id: docs-changed-subprojects
68-
uses: tj-actions/changed-files@v45
68+
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
6969
with:
7070
files_yaml: |
7171
llvm:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Get changed files
3636
id: changed-files
37-
uses: tj-actions/changed-files@v45
37+
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
3838
with:
3939
separator: ","
4040
skip_initial_fetch: true

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
- 'sycl/test-e2e/(ESIMD|InvokeSimd)/**'
7575
ur:
7676
- 'unified-runtime/**'
77+
- .github/workflows/ur-*
7778
7879
- name: Set output
7980
id: result

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ jobs:
167167
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
168168
-DLLVM_INSTALL_UTILS=ON \
169169
-DNATIVECPU_USE_OCK=Off \
170-
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV \
171-
--level_zero_v1_and_v2
170+
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV
172171
- name: Compile
173172
id: build
174173
run: cmake --build $GITHUB_WORKSPACE/build --target sycl-toolchain

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

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,7 @@ jobs:
7777
- name: Intel Arc A-Series Graphics
7878
runner: '["Linux", "arc"]'
7979
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
80-
target_devices: level_zero:gpu;opencl:gpu
81-
reset_intel_gpu: true
82-
extra_lit_opts: --param matrix-xmx8=True
83-
- name: Intel Arc A-Series Graphics for L0 V2 adapter
84-
runner: '["Linux", "arc"]'
85-
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
86-
target_devices: level_zero_v2:gpu
80+
target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu
8781
reset_intel_gpu: true
8882
extra_lit_opts: --param matrix-xmx8=True
8983
- name: E2E tests with dev igc on Intel Arc A-Series Graphics
@@ -112,13 +106,12 @@ jobs:
112106
runner: '["Linux", "bmg"]'
113107
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
114108
target_devices: level_zero:gpu
115-
# The new Xe kernel driver used by BMG doesn't support resetting.
116-
reset_intel_gpu: false
109+
reset_intel_gpu: true
117110
- name: SPIR-V Backend / Intel Battlemage Graphics
118111
runner: '["Linux", "bmg"]'
119112
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
120113
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
121-
reset_intel_gpu: false
114+
reset_intel_gpu: true
122115
extra_lit_opts: --param spirv-backend=True
123116
e2e_binaries_artifact: sycl_e2e_bin_default_spirv_backend
124117
uses: ./.github/workflows/sycl-linux-run-tests.yml

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,22 @@ jobs:
212212
steps:
213213
- name: Reset Intel GPU
214214
if: inputs.reset_intel_gpu == 'true'
215+
shell: bash
215216
run: |
216-
sudo mount -t debugfs none /sys/kernel/debug
217-
base_dir="/sys/kernel/debug/dri"
217+
if [[ '${{ inputs.runner }}' == '["Linux", "bmg"]' ]]; then
218+
sudo bash -c 'echo 0000:05:00.0 > /sys/bus/pci/drivers/xe/unbind'
219+
sudo bash -c 'echo 1 > /sys/bus/pci/devices/0000:05:00.0/reset'
220+
sudo bash -c 'echo 0000:05:00.0 > /sys/bus/pci/drivers/xe/bind'
221+
else
222+
sudo mount -t debugfs none /sys/kernel/debug
223+
base_dir="/sys/kernel/debug/dri"
218224
219-
for dir in "$base_dir"/*; do
220-
if [ -f "$dir/i915_wedged" ]; then
221-
sudo bash -c 'echo 1 > $0/i915_wedged' $dir
222-
fi
223-
done
225+
for dir in "$base_dir"/*; do
226+
if [ -f "$dir/i915_wedged" ]; then
227+
sudo bash -c 'echo 1 > $0/i915_wedged' $dir
228+
fi
229+
done
230+
fi
224231
- uses: actions/checkout@v4
225232
with:
226233
ref: ${{ inputs.devops_ref || inputs.repo_ref }}
@@ -326,6 +333,7 @@ jobs:
326333
uses: ./devops/actions/run-tests/cts
327334
with:
328335
ref: ${{ inputs.tests_ref || 'main' }}
336+
cts_exclude_ref: ${{ inputs.repo_ref }}
329337
extra_cmake_args: ${{ inputs.extra_cmake_args }}
330338
cts_testing_mode: ${{ inputs.cts_testing_mode }}
331339
sycl_cts_artifact: ${{ inputs.sycl_cts_artifact }}

.github/workflows/sycl-nightly.yml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ jobs:
8282
runner: '["Linux", "bmg"]'
8383
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
8484
target_devices: level_zero:gpu
85+
reset_intel_gpu: true
8586

8687
- name: Intel L0 Arc A-Series GPU
8788
runner: '["Linux", "arc"]'
@@ -201,12 +202,12 @@ jobs:
201202
with:
202203
mode: stop
203204

204-
build-sycl-cts:
205+
build-sycl-cts-linux:
205206
needs: ubuntu2204_build
206207
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
207208
uses: ./.github/workflows/sycl-linux-run-tests.yml
208209
with:
209-
name: Build SYCL-CTS
210+
name: Build SYCL-CTS for Linux
210211
runner: '["Linux", "build"]'
211212
cts_testing_mode: 'build-only'
212213
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
@@ -215,9 +216,10 @@ jobs:
215216
sycl_toolchain_artifact: sycl_linux_default
216217
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
217218
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
219+
sycl_cts_artifact: sycl_cts_bin_linux
218220

219-
run-sycl-cts:
220-
needs: [ubuntu2204_build, build-sycl-cts]
221+
run-sycl-cts-linux:
222+
needs: [ubuntu2204_build, build-sycl-cts-linux]
221223
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
222224
strategy:
223225
fail-fast: false
@@ -244,7 +246,41 @@ jobs:
244246
sycl_toolchain_artifact: sycl_linux_default
245247
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
246248
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
247-
sycl_cts_artifact: sycl_cts_bin
249+
sycl_cts_artifact: sycl_cts_bin_linux
250+
251+
build-sycl-cts-win:
252+
needs: build-win
253+
if: ${{ always() && !cancelled() && needs.build-win.outputs.build_conclusion == 'success' }}
254+
uses: ./.github/workflows/sycl-windows-run-tests.yml
255+
with:
256+
name: Build SYCL-CTS for Windows
257+
runner: '["Windows", "build-e2e"]'
258+
cts_testing_mode: 'build-only'
259+
tests_selector: cts
260+
ref: ${{ github.sha }}
261+
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
262+
sycl_cts_artifact: sycl_cts_bin_win
263+
264+
run-sycl-cts-win:
265+
needs: [build-win, build-sycl-cts-win]
266+
if: ${{ always() && !cancelled() && needs.build-win.outputs.build_conclusion == 'success' }}
267+
strategy:
268+
fail-fast: false
269+
matrix:
270+
include:
271+
- name: SYCL-CTS on L0 gen12
272+
runner: '["Windows", "gen12"]'
273+
target_devices: level_zero:gpu
274+
uses: ./.github/workflows/sycl-windows-run-tests.yml
275+
with:
276+
name: ${{ matrix.name }}
277+
runner: ${{ matrix.runner }}
278+
cts_testing_mode: 'run-only'
279+
target_devices: ${{ matrix.target_devices }}
280+
tests_selector: cts
281+
ref: ${{ github.sha }}
282+
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
283+
sycl_cts_artifact: sycl_cts_bin_win
248284

249285
aggregate_benchmark_results:
250286
if: github.repository == 'intel/llvm' && !cancelled()

.github/workflows/sycl-post-commit.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ concurrency:
2929
permissions: read-all
3030

3131
jobs:
32+
detect_changes:
33+
if: ${{ github.event_name == 'pull_request' }}
34+
uses: ./.github/workflows/sycl-detect-changes.yml
35+
3236
build-lin:
3337
name: Linux (Self build + no-assertions)
3438
if: github.repository == 'intel/llvm'
@@ -40,7 +44,7 @@ jobs:
4044
build_configure_extra_args: --no-assertions --hip --cuda --native_cpu -DSYCL_ENABLE_STACK_PRINTING=ON -DSYCL_LIB_WITH_DEBUG_SYMBOL=ON
4145

4246
e2e-lin:
43-
needs: [build-lin]
47+
needs: [detect_changes, build-lin]
4448
if: ${{ always() && !cancelled() && needs.build-lin.outputs.build_conclusion == 'success' }}
4549
strategy:
4650
fail-fast: false
@@ -94,6 +98,13 @@ jobs:
9498
sycl_toolchain_archive: ${{ needs.build-lin.outputs.artifact_archive_name }}
9599
sycl_toolchain_decompress_command: ${{ needs.build-lin.outputs.artifact_decompress_command }}
96100

101+
# Do not install drivers on AMD and CUDA runners.
102+
install_igc_driver: >-
103+
${{ github.event_name == 'pull_request' }} &&
104+
${{ !contains(matrix.target_devices, 'cuda') &&
105+
!contains(matrix.target_devices, 'hip') &&
106+
contains(needs.detect_changes.outputs.filters, 'drivers') }}
107+
97108
build-win:
98109
if: |
99110
always()

.github/workflows/sycl-windows-run-tests.yml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ on:
1010
type: string
1111
required: True
1212

13+
target_devices:
14+
type: string
15+
required: False
16+
extra_cmake_args:
17+
type: string
18+
required: False
19+
tests_selector:
20+
description: |
21+
Two possible options: "e2e" and "cts".
22+
type: string
23+
default: "e2e"
24+
1325
extra_lit_opts:
1426
description: |
1527
Extra options to be added to LIT_OPTS.
@@ -28,6 +40,10 @@ on:
2840
Note: it doesn't affect ./devops/actions/run-tests/* as these actions
2941
call checkout again and therefore override the devops directory, so
3042
configs/dependecies from input.ref are used.
43+
tests_ref:
44+
type: string
45+
required: False
46+
description: Commit SHA or branch to checkout e2e/cts tests.
3147

3248
sycl_toolchain_artifact:
3349
type: string
@@ -48,6 +64,23 @@ on:
4864
required: false
4965
default: "cl"
5066

67+
cts_testing_mode:
68+
description: |
69+
Testing mode to run SYCL-CTS in, can be either `full`, `build-only`
70+
or `run-only`. In `build-only` mode an artifact of the CTS binaries
71+
will be uploaded.
72+
type: string
73+
default: 'full'
74+
75+
sycl_cts_artifact:
76+
type: string
77+
default: ''
78+
required: False
79+
artifact_retention_days:
80+
description: 'E2E/SYCL-CTS binaries artifact retention period.'
81+
type: string
82+
default: 1
83+
5184
permissions: read-all
5285

5386
jobs:
@@ -86,6 +119,7 @@ jobs:
86119
- name: Register cleanup after job is finished
87120
uses: ./devops/actions/cleanup
88121
- uses: ./devops/actions/cached_checkout
122+
if: inputs.tests_selector == 'e2e'
89123
with:
90124
path: llvm
91125
ref: ${{ inputs.ref || github.sha }}
@@ -103,16 +137,19 @@ jobs:
103137
- name: Setup SYCL toolchain
104138
run: |
105139
echo "PATH=$env:GITHUB_WORKSPACE\\install\\bin;$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
140+
echo "LIB=$env:GITHUB_WORKSPACE\\install\\lib;$env:LIB" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
106141
- run: |
107142
sycl-ls
108143
- run: |
109144
sycl-ls --verbose
110145
- name: Configure E2E with Level Zero target
146+
if: inputs.tests_selector == 'e2e'
111147
shell: cmd
112148
run: |
113149
mkdir build-e2e
114150
cmake -GNinja -B build-e2e -S.\llvm\sycl\test-e2e -DSYCL_TEST_E2E_TARGETS="level_zero:gpu" -DCMAKE_CXX_COMPILER="clang++" -DLEVEL_ZERO_LIBS_DIR="D:\\github\\level-zero_win-sdk\\lib" -DLEVEL_ZERO_INCLUDE="D:\\github\\level-zero_win-sdk\\include" -DLLVM_LIT="..\\llvm\\llvm\\utils\\lit\\lit.py"
115151
- name: Run End-to-End tests
152+
if: inputs.tests_selector == 'e2e'
116153
shell: bash
117154
run: |
118155
# Run E2E tests.
@@ -121,6 +158,19 @@ jobs:
121158
fi
122159
export LIT_OPTS="-v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}"
123160
cmake --build build-e2e --target check-sycl-e2e
161+
162+
- name: Run SYCL CTS Tests
163+
if: inputs.tests_selector == 'cts'
164+
uses: ./devops/actions/run-tests/windows/cts
165+
with:
166+
ref: ${{ inputs.tests_ref || 'main' }}
167+
cts_exclude_ref: ${{ inputs.repo_ref }}
168+
extra_cmake_args: ${{ inputs.extra_cmake_args }}
169+
cts_testing_mode: ${{ inputs.cts_testing_mode }}
170+
sycl_cts_artifact: ${{ inputs.sycl_cts_artifact }}
171+
target_devices: ${{ inputs.target_devices }}
172+
retention-days: ${{ inputs.artifact_retention_days }}
173+
124174
- name: Detect hung tests
125175
if: always()
126176
shell: powershell
@@ -135,4 +185,4 @@ jobs:
135185
if: always()
136186
run: |
137187
rmdir /q /s install
138-
rmdir /q /s build-e2e
188+
if exist build-e2e rmdir /q /s build-e2e

0 commit comments

Comments
 (0)