Skip to content

Commit ec3d114

Browse files
committed
Merge branch 'sycl' into dev-glob-support
2 parents 3c3b5e5 + 1c6bfa8 commit ec3d114

File tree

3,788 files changed

+108055
-55705
lines changed

Some content is hidden

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

3,788 files changed

+108055
-55705
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
Lines changed: 63 additions & 169 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,11 +32,11 @@ 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
43-
default: "--hip --hip-amd-arch=gfx906 --cuda"
39+
default: "--hip --cuda"
4440
build_artifact_suffix:
4541
type: string
4642
required: true
@@ -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 --hip-amd-arch=gfx906 --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"'

.github/workflows/sycl_nightly.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ on:
1212
jobs:
1313
ubuntu2004_build_test:
1414
if: github.repository == 'intel/llvm'
15-
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
15+
uses: ./.github/workflows/sycl_linux_build_and_test.yml
1616
with:
17-
build_runs_on: build
18-
build_github_cache: true
1917
build_cache_root: "/__w/"
2018
build_artifact_suffix: default
2119
lts_config: "ocl_gen9;ocl_x64;hip_amdgpu"
@@ -64,11 +62,11 @@ jobs:
6462
ubuntu2004_build_test_new_pm:
6563
# Default Linux building and LIT testing using new Pass Manager by default
6664
if: github.repository == 'intel/llvm'
67-
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
65+
uses: ./.github/workflows/sycl_linux_build_and_test.yml
6866
with:
6967
build_runs_on: build
7068
build_cache_root: "/__w/"
7169
build_cache_suffix: new_pm
7270
build_artifact_suffix: new_pm
73-
build_configure_extra_args: '--hip --hip-amd-arch=gfx906 --cuda --cmake-opt=-DLLVM_ENABLE_NEW_PASS_MANAGER=ON'
71+
build_configure_extra_args: '--hip --cuda --cmake-opt=-DLLVM_ENABLE_NEW_PASS_MANAGER=ON'
7472
lts_config: "hip_amdgpu;ocl_x64"

.github/workflows/sycl_post_commit.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
1-
name: Linux Post Commit Checks
1+
name: SYCL Post Commit
22

33
on:
44
push:
55
branches:
6-
- sycl
6+
- sycl
7+
pull_request:
8+
branches:
9+
- sycl
10+
paths:
11+
- .github/workflows/sycl_post_commit.yml
12+
713
jobs:
814
linux_default:
915
name: Linux Default
10-
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
16+
uses: ./.github/workflows/sycl_linux_build_and_test.yml
1117
with:
1218
build_runs_on: build
1319
build_cache_root: "/__w/llvm"
14-
build_github_cache: true
1520
build_artifact_suffix: default
1621
linux_no_assert:
1722
name: Linux (no assert)
18-
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
23+
uses: ./.github/workflows/sycl_linux_build_and_test.yml
1924
with:
2025
build_runs_on: build
2126
build_cache_root: "/__w/llvm"
22-
build_github_cache: true
2327
build_cache_suffix: gcc_no_assertions
2428
build_artifact_suffix: gcc_no_assertions
2529
build_configure_extra_args: --no-assertions
@@ -93,3 +97,7 @@ jobs:
9397
with:
9498
name: sycl_linux_${{ matrix.config }}
9599
path: llvm_sycl.tar.gz
100+
101+
windows_default:
102+
name: Windows
103+
uses: ./.github/workflows/sycl_windows_build_and_test.yml

0 commit comments

Comments
 (0)