Skip to content

Commit 330eb76

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into new_offload_entry
2 parents e75c615 + 90f7820 commit 330eb76

File tree

267 files changed

+4932
-3023
lines changed

Some content is hidden

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

267 files changed

+4932
-3023
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
target_devices: cuda:gpu
7272
# No idea why but that seems to work and be in sync with the main
7373
# pre-commit workflow.
74-
ref: ${{ github.event.workflow_run.referenced_workflows[0].sha }}
74+
repo_ref: ${{ github.event.workflow_run.referenced_workflows[0].sha }}
7575

7676
sycl_toolchain_artifact: sycl_linux_default
7777
sycl_toolchain_archive: llvm_sycl.tar.zst

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ jobs:
121121
image: ${{ matrix.image }}
122122
image_options: ${{ matrix.image_options }}
123123
target_devices: ${{ matrix.target_devices }}
124-
extra_lit_opts: --param fallback-to-build-if-requires-build-and-run=True ${{ matrix.extra_lit_opts }}
124+
extra_lit_opts: ${{ matrix.extra_lit_opts }}
125125
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
126-
ref: ${{ github.sha }}
126+
repo_ref: ${{ github.sha }}
127127
sycl_toolchain_artifact: sycl_linux_default
128128
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
129129
sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }}
@@ -180,7 +180,7 @@ jobs:
180180
env: '{"LIT_FILTER":"PerformanceTests/"}'
181181
extra_lit_opts: -a -j 1 --param enable-perf-tests=True
182182

183-
ref: ${{ github.sha }}
183+
repo_ref: ${{ github.sha }}
184184

185185
sycl_toolchain_artifact: sycl_linux_default
186186
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ on:
3535
type: string
3636
default: ''
3737

38-
ref:
38+
repo_ref:
3939
type: string
4040
required: True
4141
description: |
@@ -214,7 +214,7 @@ jobs:
214214
done
215215
- uses: actions/checkout@v4
216216
with:
217-
ref: ${{ inputs.devops_ref || inputs.ref }}
217+
ref: ${{ inputs.devops_ref || inputs.repo_ref }}
218218
sparse-checkout: |
219219
devops
220220
- name: Register cleanup after job is finished
@@ -304,7 +304,7 @@ jobs:
304304
if: inputs.tests_selector == 'e2e'
305305
uses: ./devops/actions/run-tests/e2e
306306
with:
307-
ref: ${{ inputs.tests_ref || inputs.ref || github.sha }}
307+
ref: ${{ inputs.tests_ref || inputs.repo_ref || github.sha }}
308308
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}
309309
testing_mode: ${{ inputs.e2e_testing_mode }}
310310
extra_cmake_args: ${{ inputs.extra_cmake_args }}

.github/workflows/sycl-nightly.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
tests_selector: e2e
127127
extra_lit_opts: "--param 'cxx_flags=-D_GLIBCXX_USE_CXX11_ABI=0' ${{ matrix.extra_lit_opts }}"
128128
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
129-
ref: ${{ github.sha }}
129+
repo_ref: ${{ github.sha }}
130130
sycl_toolchain_artifact: sycl_linux_default
131131
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
132132
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
@@ -142,7 +142,7 @@ jobs:
142142
reset_intel_gpu: true
143143
extra_lit_opts: -j 50
144144
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
145-
ref: ${{ github.sha }}
145+
repo_ref: ${{ github.sha }}
146146
sycl_toolchain_artifact: sycl_linux_oneapi
147147
sycl_toolchain_archive: ${{ needs.ubuntu2404_oneapi_build.outputs.artifact_archive_name }}
148148
sycl_toolchain_decompress_command: ${{ needs.ubuntu2404_oneapi_build.outputs.artifact_decompress_command }}
@@ -187,7 +187,7 @@ jobs:
187187
image: ghcr.io/intel/llvm/ubuntu2204_build:latest
188188
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN --env NVIDIA_DISABLE_REQUIRE=1
189189
target_devices: cuda:gpu
190-
ref: ${{ github.sha }}
190+
repo_ref: ${{ github.sha }}
191191

192192
sycl_toolchain_artifact: sycl_linux_default
193193
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
@@ -211,7 +211,7 @@ jobs:
211211
cts_testing_mode: 'build-only'
212212
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
213213
tests_selector: cts
214-
ref: ${{ github.sha }}
214+
repo_ref: ${{ github.sha }}
215215
sycl_toolchain_artifact: sycl_linux_default
216216
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
217217
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
@@ -240,7 +240,7 @@ jobs:
240240
image_options: ${{ matrix.image_options }}
241241
target_devices: ${{ matrix.target_devices }}
242242
tests_selector: cts
243-
ref: ${{ github.sha }}
243+
repo_ref: ${{ github.sha }}
244244
sycl_toolchain_artifact: sycl_linux_default
245245
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
246246
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
@@ -281,7 +281,7 @@ jobs:
281281
target_devices: ${{ matrix.target_devices }}
282282
tests_selector: compute-benchmarks
283283
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
284-
ref: ${{ github.sha }}
284+
repo_ref: ${{ github.sha }}
285285
sycl_toolchain_artifact: sycl_linux_default
286286
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
287287
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ on:
1818
- .github/workflows/sycl-macos-build-and-test.yml
1919
- ./devops/actions/cleanup
2020
- ./devops/actions/cached_checkout
21+
- ./devops/dependencies.json
22+
- ./devops/dependencies-igc-dev.json
2123

2224
concurrency:
2325
# Cancel a currently running workflow from the same PR or commit hash.
@@ -86,7 +88,7 @@ jobs:
8688
extra_lit_opts: ${{ matrix.extra_lit_opts }}
8789
env: ${{ matrix.env || '{}' }}
8890

89-
ref: ${{ github.sha }}
91+
repo_ref: ${{ github.sha }}
9092

9193
sycl_toolchain_artifact: sycl_linux_default
9294
sycl_toolchain_archive: ${{ needs.build-lin.outputs.artifact_archive_name }}

.github/workflows/sycl-rel-nightly.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
tests_selector: ${{ matrix.tests_selector }}
9090
extra_lit_opts: ${{ matrix.extra_lit_opts }}
9191
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
92-
ref: sycl-rel-6_0_0
92+
repo_ref: sycl-rel-6_0_0
9393
devops_ref: sycl
9494
sycl_toolchain_artifact: sycl_linux_default
9595
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
@@ -141,7 +141,7 @@ jobs:
141141
image: ghcr.io/intel/llvm/ubuntu2204_build:latest
142142
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN --env NVIDIA_DISABLE_REQUIRE=1
143143
target_devices: cuda:gpu
144-
ref: sycl-rel-6_0_0
144+
repo_ref: sycl-rel-6_0_0
145145
devops_ref: sycl
146146

147147
sycl_toolchain_artifact: sycl_linux_default
@@ -167,7 +167,7 @@ jobs:
167167
cts_testing_mode: 'build-only'
168168
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
169169
tests_selector: cts
170-
ref: sycl-rel-6_0_0
170+
repo_ref: sycl-rel-6_0_0
171171
devops_ref: sycl
172172
sycl_toolchain_artifact: sycl_linux_default
173173
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
@@ -197,7 +197,7 @@ jobs:
197197
image_options: ${{ matrix.image_options }}
198198
target_devices: ${{ matrix.target_devices }}
199199
tests_selector: cts
200-
ref: ${{ github.sha }}
200+
repo_ref: ${{ github.sha }}
201201
devops_ref: sycl
202202
sycl_toolchain_artifact: sycl_linux_default
203203
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}

.github/workflows/sycl-weekly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
cts_testing_mode: 'build-only'
3131
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
3232
tests_selector: cts
33-
ref: ${{ github.sha }}
33+
repo_ref: ${{ github.sha }}
3434
sycl_toolchain_artifact: sycl_linux_default
3535
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
3636
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
@@ -60,7 +60,7 @@ jobs:
6060
image_options: ${{ matrix.image_options }}
6161
target_devices: ${{ matrix.target_devices }}
6262
tests_selector: cts
63-
ref: ${{ github.sha }}
63+
repo_ref: ${{ github.sha }}
6464
sycl_toolchain_artifact: sycl_linux_default
6565
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
6666
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
shell: cmd
112112
run: |
113113
mkdir build-e2e
114-
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"
114+
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"
115115
- name: Run End-to-End tests
116116
shell: bash
117117
run: |
Lines changed: 6 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -1,198 +1,12 @@
11
name: Benchmarks Reusable
22

3-
on:
4-
workflow_call:
5-
inputs:
6-
str_name:
7-
required: true
8-
type: string
9-
pr_no:
10-
required: true
11-
# even though this is a number, this is a workaround for issues with
12-
# reusable workflow calls that result in "Unexpected value '0'" error.
13-
type: string
14-
bench_script_params:
15-
required: false
16-
type: string
17-
default: ''
18-
sycl_config_params:
19-
required: false
20-
type: string
21-
default: ''
22-
upload_report:
23-
required: false
24-
type: boolean
25-
default: false
26-
compute_runtime_commit:
27-
required: false
28-
type: string
29-
default: ''
3+
# This workflow is a WIP: This workflow file acts as a placeholder.
304

31-
permissions:
32-
contents: read
33-
pull-requests: write
5+
on: [ workflow_call ]
346

357
jobs:
36-
bench-run:
37-
name: Build SYCL, Run Benchmarks
38-
strategy:
39-
matrix:
40-
adapter: [
41-
{str_name: "${{ inputs.str_name }}",
42-
sycl_config: "${{ inputs.sycl_config_params }}"
43-
}
44-
]
45-
build_type: [Release]
46-
compiler: [{c: clang, cxx: clang++}]
47-
48-
runs-on: "PVC_PERF"
49-
8+
do-nothing:
9+
runs-on: ubuntu-latest
5010
steps:
51-
- name: Add comment to PR
52-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
53-
if: ${{ always() && inputs.pr_no != 0 }}
54-
with:
55-
script: |
56-
const pr_no = '${{ inputs.pr_no }}';
57-
const adapter = '${{ matrix.adapter.str_name }}';
58-
const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}';
59-
const params = '${{ inputs.bench_script_params }}';
60-
const body = `Compute Benchmarks ${adapter} run (with params: ${params}):\n${url}`;
61-
62-
github.rest.issues.createComment({
63-
issue_number: pr_no,
64-
owner: context.repo.owner,
65-
repo: context.repo.repo,
66-
body: body
67-
})
68-
69-
- name: Checkout SYCL
70-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
71-
with:
72-
path: sycl-repo
73-
74-
# We need to fetch special ref for proper PR's merge commit. Note, this ref may be absent if the PR is already merged.
75-
- name: Fetch PR's merge commit
76-
if: ${{ inputs.pr_no != 0 }}
77-
working-directory: ${{github.workspace}}/sycl-repo
78-
run: |
79-
git fetch -- https://github.com/${{github.repository}} +refs/pull/${{ inputs.pr_no }}/*:refs/remotes/origin/pr/${{ inputs.pr_no }}/*
80-
git checkout origin/pr/${{ inputs.pr_no }}/merge
81-
git rev-parse origin/pr/${{ inputs.pr_no }}/merge
82-
83-
- name: Install pip packages
84-
run: |
85-
pip install --force-reinstall -r ${{github.workspace}}/sycl-repo/unified-runtime/scripts/benchmarks/requirements.txt
86-
87-
- name: Configure SYCL
88-
run: >
89-
python3 sycl-repo/buildbot/configure.py
90-
-t ${{matrix.build_type}}
91-
-o ${{github.workspace}}/sycl_build
92-
--cmake-gen "Ninja"
93-
--cmake-opt="-DLLVM_INSTALL_UTILS=ON"
94-
--cmake-opt="-DSYCL_PI_TESTS=OFF"
95-
--cmake-opt=-DCMAKE_C_COMPILER_LAUNCHER=ccache
96-
--cmake-opt=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
97-
${{matrix.adapter.sycl_config}}
98-
99-
- name: Build SYCL
100-
run: cmake --build ${{github.workspace}}/sycl_build -j $(nproc)
101-
102-
# We need a complete installed UR for compute-benchmarks.
103-
- name: Configure UR
104-
run: >
105-
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
106-
-S${{github.workspace}}/sycl-repo/unified-runtime
107-
-B${{github.workspace}}/ur_build
108-
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/ur_install
109-
-DUR_BUILD_TESTS=OFF
110-
-DUR_BUILD_ADAPTER_L0=ON
111-
-DUR_BUILD_ADAPTER_L0_V2=ON
112-
-DUMF_DISABLE_HWLOC=ON
113-
114-
- name: Build UR
115-
run: cmake --build ${{github.workspace}}/ur_build -j $(nproc)
116-
117-
- name: Install UR
118-
run: cmake --install ${{github.workspace}}/ur_build
119-
120-
- name: Compute core range
121-
run: |
122-
# Compute the core range for the first NUMA node; second node is for UMF jobs.
123-
# Skip the first 4 cores - the kernel is likely to schedule more work on these.
124-
CORES="$(lscpu | awk '
125-
/NUMA node0 CPU|On-line CPU/ {line=$0}
126-
END {
127-
split(line, a, " ")
128-
split(a[4], b, ",")
129-
sub(/^0/, "4", b[1])
130-
print b[1]
131-
}')"
132-
echo "Selected core: $CORES"
133-
echo "CORES=$CORES" >> $GITHUB_ENV
134-
135-
ZE_AFFINITY_MASK=0
136-
echo "ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK" >> $GITHUB_ENV
137-
138-
- name: Run benchmarks
139-
working-directory: ${{ github.workspace }}
140-
id: benchmarks
141-
run: >
142-
taskset -c "${{ env.CORES }}" ${{ github.workspace }}/sycl-repo/unified-runtime/scripts/benchmarks/main.py
143-
~/llvm_bench_workdir
144-
--sycl ${{ github.workspace }}/sycl_build
145-
--ur ${{ github.workspace }}/ur_install
146-
--adapter ${{ matrix.adapter.str_name }}
147-
--compare baseline
148-
--compute-runtime ${{ inputs.compute_runtime_commit }}
149-
--build-igc
150-
${{ inputs.upload_report && '--output-html' || '' }}
151-
${{ inputs.pr_no != 0 && '--output-markdown' || '' }}
152-
${{ inputs.bench_script_params }}
153-
154-
- name: Print benchmark results
155-
run: |
156-
cat ${{ github.workspace }}/benchmark_results.md || true
157-
158-
- name: Add comment to PR
159-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
160-
if: ${{ always() && inputs.pr_no != 0 }}
161-
with:
162-
script: |
163-
let markdown = ""
164-
try {
165-
const fs = require('fs');
166-
markdown = fs.readFileSync('benchmark_results.md', 'utf8');
167-
} catch(err) {
168-
}
169-
170-
const pr_no = '${{ inputs.pr_no }}';
171-
const adapter = '${{ matrix.adapter.str_name }}';
172-
const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}';
173-
const test_status = '${{ steps.benchmarks.outcome }}';
174-
const job_status = '${{ job.status }}';
175-
const params = '${{ inputs.bench_script_params }}';
176-
const body = `Benchmarks ${adapter} run (${params}):\n${url}\nJob status: ${job_status}. Test status: ${test_status}.\n ${markdown}`;
177-
178-
github.rest.issues.createComment({
179-
issue_number: pr_no,
180-
owner: context.repo.owner,
181-
repo: context.repo.repo,
182-
body: body
183-
})
184-
185-
- name: Rename benchmark results file
186-
if: ${{ always() && inputs.upload_report }}
187-
run: mv benchmark_results.html benchmark_results_${{ inputs.pr_no }}.html
188-
189-
- name: Upload HTML report
190-
if: ${{ always() && inputs.upload_report }}
191-
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
192-
with:
193-
path: benchmark_results_${{ inputs.pr_no }}.html
194-
key: benchmark-results-${{ inputs.pr_no }}-${{ matrix.adapter.str_name }}-${{ github.run_id }}
195-
196-
- name: Get information about platform
197-
if: ${{ always() }}
198-
run: ${{github.workspace}}/sycl-repo/unified-runtime/.github/scripts/get_system_info.sh
11+
- run: echo 'This workflow is a WIP.'
12+

0 commit comments

Comments
 (0)