Skip to content

Commit d8bc53f

Browse files
authored
Merge branch 'sycl' into bf16-cvt-ext
2 parents 8d2d11f + a5564e1 commit d8bc53f

File tree

6,437 files changed

+200122
-92448
lines changed

Some content is hidden

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

6,437 files changed

+200122
-92448
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ sycl/ @intel/llvm-reviewers-runtime
2525
sycl/ReleaseNotes.md @intel/dpcpp-doc-reviewers
2626
sycl/doc/ @intel/dpcpp-doc-reviewers
2727
sycl/doc/design/ @intel/dpcpp-specification-reviewers
28+
sycl/doc/design/spirv-extensions/ @intel/dpcpp-spirv-doc-reviewers
2829
sycl/doc/extensions/ @intel/dpcpp-specification-reviewers
29-
sycl/doc/extensions/SPIRV/ @intel/dpcpp-spirv-doc-reviewers
3030

3131
# Level Zero plugin
3232
sycl/plugins/level_zero/ @intel/dpcpp-l0-pi-reviewers
@@ -51,4 +51,4 @@ clang/tools/clang-offload-*/ @intel/dpcpp-tools-reviewers
5151
ESIMD/ @intel/dpcpp-esimd-reviewers
5252
esimd/ @intel/dpcpp-esimd-reviewers
5353
sycl/include/sycl/ext/intel/experimental/esimd.hpp @intel/dpcpp-esimd-reviewers
54-
sycl/doc/extensions/ExplicitSIMD/ @intel/dpcpp-esimd-reviewers
54+
sycl/doc/extensions/experimental/sycl_ext_intel_esimd/ @intel/dpcpp-esimd-reviewers

.github/workflows/issue-release-workflow.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ on:
1919
types:
2020
- created
2121
- edited
22+
issues:
23+
types:
24+
- opened
2225

2326
env:
24-
COMMENT_BODY: ${{ github.event.comment.body }}
27+
COMMENT_BODY: ${{ github.event.action == 'opened' && github.event.issue.body || github.event.comment.body }}
2528

2629
jobs:
2730
backport-commits:
@@ -30,7 +33,7 @@ jobs:
3033
if: >-
3134
(github.repository == 'llvm/llvm-project') &&
3235
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
33-
contains(github.event.comment.body, '/cherry-pick')
36+
contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick')
3437
steps:
3538
- name: Fetch LLVM sources
3639
uses: actions/checkout@v2

.github/workflows/issue-subscriber.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ jobs:
1818
pip install -r requirements.txt
1919
2020
- name: Update watchers
21+
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
22+
env:
23+
LABEL_NAME: ${{ github.event.label.name }}
2124
run: |
2225
./github-automation.py \
23-
--token ${{ secrets.ISSUE_SUBSCRIBER_TOKEN }} \
26+
--token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
2427
issue-subscriber \
25-
--issue-number ${{ github.event.issue.number }} \
26-
--label-name ${{ github.event.label.name }}
28+
--issue-number '${{ github.event.issue.number }}' \
29+
--label-name "$LABEL_NAME"

.github/workflows/sycl_cleanup.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Cleanup
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- SYCL
7+
- SYCL Nightly Builds
8+
- SYCL Post Commit
9+
types: [completed]
10+
11+
jobs:
12+
cleanup:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/github-script@v6
16+
with:
17+
script: |
18+
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
run_id: context.payload.workflow_run.id,
22+
});
23+
let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
24+
return artifact.name.startsWith("sycl_linux_");
25+
});
26+
matchArtifacts.forEach(async (artifact) => {
27+
await github.rest.actions.deleteArtifact({
28+
owner: context.repo.owner,
29+
repo: context.repo.repo,
30+
artifact_id: artifact.id
31+
});
32+
});
Lines changed: 62 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Reusable SYCL Linux build and test workflow
22

33
on:
4-
pull_request:
5-
paths:
6-
- '.github/workflows/sycl_linux_build_and_test.yml'
74
workflow_call:
85
inputs:
96
cc:
@@ -21,11 +18,10 @@ on:
2118
build_runs_on:
2219
type: string
2320
required: false
24-
default: "ubuntu-latest"
25-
build_github_cache:
26-
type: boolean
21+
default: "build"
22+
build_ref:
23+
type: string
2724
required: false
28-
default: false
2925
build_cache_root:
3026
type: string
3127
required: true
@@ -36,7 +32,7 @@ on:
3632
build_cache_size:
3733
type: string
3834
required: false
39-
default: 2G
35+
default: 8G
4036
build_configure_extra_args:
4137
type: string
4238
required: false
@@ -52,61 +48,29 @@ on:
5248
type: string
5349
required: false
5450
default: ""
55-
gen9_runs_on:
51+
lts_cmake_extra_args:
5652
type: string
5753
required: false
58-
default: "gen9"
54+
default: ""
5955
amdgpu_image:
6056
type: string
6157
required: false
6258
default: "ghcr.io/intel/llvm/ubuntu2004_build:latest"
63-
amdgpu_runs_on:
59+
lts_ref:
6460
type: string
6561
required: false
66-
default: "amdgpu"
62+
default: 'intel'
63+
max_parallel:
64+
type: number
65+
required: false
66+
default: 4
6767

6868
jobs:
69-
configure:
70-
name: Pre-build configuration
71-
runs-on: ubuntu-latest
72-
outputs:
73-
params: ${{ steps.input-parameters.outputs.params }}
74-
steps:
75-
- id: input-parameters
76-
env:
77-
INPUTS: ${{ toJSON(inputs) }}
78-
run: |
79-
if [[ "$GITHUB_WORKFLOW" == "Reusable SYCL Linux build and test workflow" ]]; then
80-
INPUTS="{
81-
\"cc\":\"gcc\",
82-
\"cxx\":\"g++\",
83-
\"build_runs_on\":\"build\",
84-
\"build_image\":\"ghcr.io/intel/llvm/ubuntu2004_build:latest\",
85-
\"build_github_cache\":\"false\",
86-
\"build_cache_root\":\"/__w/\",
87-
\"build_cache_suffix\":\"default\",
88-
\"build_cache_size\":\"2G\",
89-
\"build_configure_extra_args\":\"--hip --cuda\",
90-
\"build_artifact_suffix\":\"default\",
91-
\"build_upload_artifact\":\"false\",
92-
\"intel_drivers_image\":\"ghcr.io/intel/llvm/ubuntu2004_intel_drivers:latest\",
93-
\"amdgpu_image\":\"ghcr.io/intel/llvm/ubuntu2004_build:latest\",
94-
\"lts_config\":\"ocl_x64;hip_amdgpu\",
95-
\"gen9_runs_on\":\"gen9\",
96-
\"amdgpu_runs_on\":\"amdgpu\"
97-
}"
98-
fi
99-
INPUTS="${INPUTS//'%'/'%25'}"
100-
INPUTS="${INPUTS//$'\n'/'%0A'}"
101-
INPUTS="${INPUTS//$'\r'/'%0D'}"
102-
echo "::set-output name=params::$INPUTS"
103-
echo "$INPUTS"
10469
build:
10570
name: Build + LIT
106-
needs: configure
107-
runs-on: ${{ fromJSON(needs.configure.outputs.params).build_runs_on }}
71+
runs-on: ${{ inputs.build_runs_on }}
10872
container:
109-
image: ${{ fromJSON(needs.configure.outputs.params).build_image }}
73+
image: ${{ inputs.build_image }}
11074
options: -u 1001:1001
11175
steps:
11276
# GHA requires relative paths for actions. Copy actions from container root
@@ -118,24 +82,16 @@ jobs:
11882
- uses: ./actions/cached_checkout
11983
with:
12084
path: src
85+
ref: ${{ inputs.build_ref || github.ref }}
12186
cache_path: "/__w/repo_cache/"
122-
- name: Setup Cache
123-
uses: actions/cache@v2
124-
if: ${{ steps.parameters.build_github_cache }}
125-
id: cache
126-
with:
127-
path: ${{ fromJSON(needs.configure.outputs.params).build_cache_root }}/build_cache_${{ fromJSON(needs.configure.outputs.params).build_cache_suffix }}
128-
key: sycl-build-${{ fromJSON(needs.configure.outputs.params).build_cache_suffix }}-${{ github.sha }}
129-
restore-keys: |
130-
sycl-build-${{ fromJSON(needs.configure.outputs.params).build_cache_suffix }}-
13187
- name: Configure
13288
env:
133-
CC: ${{ fromJSON(needs.configure.outputs.params).cc }}
134-
CXX: ${{ fromJSON(needs.configure.outputs.params).cxx }}
135-
CACHE_ROOT: ${{ fromJSON(needs.configure.outputs.params).build_cache_root }}
136-
CACHE_SUFFIX: ${{ fromJSON(needs.configure.outputs.params).build_cache_suffix }}
137-
CACHE_SIZE: ${{ fromJSON(needs.configure.outputs.params).build_cache_size }}
138-
ARGS: ${{ fromJSON(needs.configure.outputs.params).build_configure_extra_args }}
89+
CC: ${{ inputs.cc }}
90+
CXX: ${{ inputs.cxx }}
91+
CACHE_ROOT: ${{ inputs.build_cache_root }}
92+
CACHE_SUFFIX: ${{ inputs.build_cache_suffix }}
93+
CACHE_SIZE: ${{ inputs.build_cache_size }}
94+
ARGS: ${{ inputs.build_configure_extra_args }}
13995
CUDA_LIB_PATH: "/usr/local/cuda/lib64/stubs"
14096
run: |
14197
mkdir -p $CACHE_ROOT/build_cache_$CACHE_SUFFIX
@@ -203,83 +159,50 @@ jobs:
203159
- name: Pack LIT
204160
run: tar -cJf lit.tar.xz -C $GITHUB_WORKSPACE/src/llvm/utils/lit .
205161
- name: Upload toolchain
206-
uses: actions/upload-artifact@v1
162+
uses: actions/upload-artifact@v2
207163
with:
208-
name: sycl_linux_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
164+
name: sycl_linux_${{ inputs.build_artifact_suffix }}
209165
path: llvm_sycl.tar.xz
210166
- name: Upload LIT
211-
uses: actions/upload-artifact@v1
167+
uses: actions/upload-artifact@v2
212168
with:
213-
name: sycl_lit_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
169+
name: sycl_lit_${{ inputs.build_artifact_suffix }}
214170
path: lit.tar.xz
215171

216-
llvm_test_suite_l0_gen9:
217-
name: L0 GEN9 Test Suite
218-
needs: [build, configure]
219-
if: ${{ contains(fromJSON(needs.configure.outputs.params).lts_config, 'l0_gen9') }}
220-
runs-on: ${{ fromJSON(needs.configure.outputs.params).gen9_runs_on }}
221-
container:
222-
image: ${{ fromJSON(needs.configure.outputs.params).intel_drivers_image }}
223-
options: -u 1001 --device=/dev/dri
224-
steps:
225-
- run: cp -r /actions .
226-
- name: Register cleanup after job is finished
227-
uses: ./actions/cleanup
228-
# FIXME cached_checkout fails here, but works everywhere else
229-
- uses: actions/checkout@v2
230-
with:
231-
path: llvm
232-
# TODO should this action be packed into container as well?
233-
- uses: ./llvm/devops/actions/llvm_test_suite
234-
name: Run LLVM Test Suite
235-
with:
236-
# TODO allow custom test references
237-
test_ref: 'intel'
238-
sycl_artifact: sycl_linux_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
239-
sycl_archive: llvm_sycl.tar.xz
240-
lit_artifact: sycl_lit_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
241-
lit_archive: lit.tar.xz
242-
check_sycl_all: 'level_zero:gpu,host'
243-
results_name_suffix: l0_gpu_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
244-
cmake_args: '-DGPU_AOT_TARGET_OPTS="\\\"-device gen9\\\""'
245-
246-
llvm_test_suite_ocl_gen9:
247-
name: OCL GEN9 Test Suite
248-
needs: [build, configure]
249-
if: ${{ contains(fromJSON(needs.configure.outputs.params).lts_config, 'ocl_gen9') }}
250-
runs-on: ${{ fromJSON(needs.configure.outputs.params).gen9_runs_on }}
251-
container:
252-
image: ${{ fromJSON(needs.configure.outputs.params).intel_drivers_image }}
253-
options: -u 1001 --device=/dev/dri
172+
# This job generates matrix of tests for LLVM Test Suite
173+
resolve_matrix:
174+
name: Resolve Test Matrix
175+
runs-on: ubuntu-latest
176+
outputs:
177+
lts: ${{ steps.work.outputs.lts }}
254178
steps:
255-
- run: cp -r /actions .
256-
- name: Register cleanup after job is finished
257-
uses: ./actions/cleanup
258-
# FIXME cached_checkout fails here, but works everywhere else
259-
- uses: actions/checkout@v2
260-
with:
261-
path: llvm
262-
- uses: ./llvm/devops/actions/llvm_test_suite
263-
name: Run LLVM Test Suite
179+
- name: Download scripts
180+
run: |
181+
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/scripts/generate_test_matrix.js
182+
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/test_configs.json
183+
- id: work
184+
uses: actions/github-script@v6
185+
name: Generate matrix
186+
env:
187+
GHA_INPUTS: ${{ toJSON(inputs) }}
264188
with:
265-
# TODO allow custom test references
266-
test_ref: 'intel'
267-
sycl_artifact: sycl_linux_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
268-
sycl_archive: llvm_sycl.tar.xz
269-
lit_artifact: sycl_lit_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
270-
lit_archive: lit.tar.xz
271-
check_sycl_all: 'opencl:gpu,host'
272-
results_name_suffix: ocl_gpu_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
273-
cmake_args: '-DGPU_AOT_TARGET_OPTS="\\\"-device gen9\\\""'
189+
script: |
190+
const script = require('./generate_test_matrix.js');
191+
script({core, process});
274192
275-
llvm_test_suite_ocl_x64:
276-
name: OCL x64 Test Suite
277-
needs: [build, configure]
278-
if: ${{ contains(fromJSON(needs.configure.outputs.params).lts_config, 'ocl_x64') }}
279-
runs-on: x64
193+
llvm_test_suite:
194+
needs: [build, resolve_matrix]
195+
if: ${{ inputs.lts_config != '' }}
196+
strategy:
197+
fail-fast: false
198+
max-parallel: ${{ inputs.max_parallel }}
199+
matrix:
200+
include: ${{ fromJSON(needs.resolve_matrix.outputs.lts) }}
201+
name: ${{ matrix.name }}
202+
runs-on: ${{ matrix.runs-on }}
280203
container:
281-
image: ${{ fromJSON(needs.configure.outputs.params).intel_drivers_image }}
282-
options: -u 1001
204+
image: ${{ matrix.image }}
205+
options: ${{ matrix.container_options }}
283206
steps:
284207
- run: cp -r /actions .
285208
- name: Register cleanup after job is finished
@@ -288,45 +211,16 @@ jobs:
288211
- uses: actions/checkout@v2
289212
with:
290213
path: llvm
214+
# TODO should this action be packed into container as well?
291215
- uses: ./llvm/devops/actions/llvm_test_suite
292216
name: Run LLVM Test Suite
293217
with:
294-
# TODO allow custom test references
295-
test_ref: 'intel'
296-
sycl_artifact: sycl_linux_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
218+
test_ref: ${{ inputs.lts_ref }}
219+
sycl_artifact: sycl_linux_${{ inputs.build_artifact_suffix }}
297220
sycl_archive: llvm_sycl.tar.xz
298-
lit_artifact: sycl_lit_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
221+
lit_artifact: sycl_lit_${{ inputs.build_artifact_suffix }}
299222
lit_archive: lit.tar.xz
300-
check_sycl_all: 'opencl:cpu,host'
301-
results_name_suffix: ocl_x64_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
223+
check_sycl_all: ${{ matrix.check_sycl_all }}
224+
results_name_suffix: ${{ matrix.config }}_${{ inputs.build_artifact_suffix }}
225+
cmake_args: '${{ matrix.cmake_args }} ${{ inputs.lts_cmake_extra_args }}'
302226

303-
llvm_test_suite_hip_amdgpu:
304-
name: HIP AMD GPU Test Suite
305-
needs: [build, configure]
306-
if: ${{ contains(fromJSON(needs.configure.outputs.params).lts_config, 'hip_amdgpu') }}
307-
runs-on: ${{ fromJSON(needs.configure.outputs.params).amdgpu_runs_on }}
308-
container:
309-
image: ${{ fromJSON(needs.configure.outputs.params).amdgpu_image }}
310-
options: --device=/dev/dri --device=/dev/kfd
311-
steps:
312-
- run: cp -r /actions .
313-
- name: Register cleanup after job is finished
314-
uses: ./actions/cleanup
315-
# TODO remove this step one LLVM Test Suite action is settled and packed
316-
# into container.
317-
# FIXME cached_checkout fails here, but works everywhere else
318-
- uses: actions/checkout@v2
319-
with:
320-
path: llvm
321-
- uses: ./llvm/devops/actions/llvm_test_suite
322-
name: Run LLVM Test Suite
323-
with:
324-
# TODO allow custom test references
325-
test_ref: 'intel'
326-
sycl_artifact: sycl_linux_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
327-
sycl_archive: llvm_sycl.tar.xz
328-
lit_artifact: sycl_lit_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
329-
lit_archive: lit.tar.xz
330-
check_sycl_all: 'hip:gpu,host'
331-
results_name_suffix: hip_amdgpu_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
332-
cmake_args: '-DHIP_PLATFORM="AMD" -DAMD_ARCH="gfx1031"'

0 commit comments

Comments
 (0)