Skip to content

Commit 2e95f53

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into private/asachkov/cleanup-old-spec-constants-support
2 parents 8a61b01 + 92855be commit 2e95f53

File tree

210 files changed

+4511
-1735
lines changed

Some content is hidden

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

210 files changed

+4511
-1735
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ clang/tools/clang-offload-*/ @intel/dpcpp-tools-reviewers
7474
ESIMD/ @intel/dpcpp-esimd-reviewers
7575
esimd/ @intel/dpcpp-esimd-reviewers
7676
sycl/include/sycl/ext/intel/esimd.hpp @intel/dpcpp-esimd-reviewers
77-
sycl/doc/extensions/experimental/sycl_ext_intel_esimd/ @intel/dpcpp-esimd-reviewers
77+
sycl/doc/extensions/**/sycl_ext_intel_esimd/ @intel/dpcpp-esimd-reviewers
7878
llvm/lib/SYCLLowerIR/CMakeLists.txt @intel/dpcpp-tools-reviewers @intel/dpcpp-esimd-reviewers
7979

8080
# invoke_simd

.github/workflows/aws.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Start/Stop AWS instance
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
mode:
7+
description: "Mode of operation: start or stop"
8+
type: string
9+
required: true
10+
11+
runs-on-list:
12+
# See devops/actions/aws-ec2/action.yml for more details.
13+
description: "JSON string with array of objects with aws-type, runs-on, aws-ami, aws-spot, aws-disk, aws-timebomb, one-job properties"
14+
type: string
15+
required: true
16+
17+
jobs:
18+
aws:
19+
runs-on: ubuntu-20.04
20+
environment: aws
21+
steps:
22+
- name: Setup script
23+
run: |
24+
mkdir -p ./aws-ec2
25+
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/action.yml -P ./aws-ec2
26+
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/aws-ec2.js -P ./aws-ec2
27+
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/package.json -P ./aws-ec2
28+
npm install ./aws-ec2
29+
- name: Start AWS EC2 runners
30+
uses: ./aws-ec2
31+
with:
32+
mode: ${{ inputs.mode }}
33+
runs-on-list: ${{ inputs.runs-on-list }}
34+
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
35+
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
36+
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: SYCL E2E Matrix on Nightly build
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
ref:
7+
type: string
8+
required: true
9+
uniq:
10+
description: Unique string to name dynamic runners in AWS
11+
type: string
12+
required: false
13+
default: ${{ github.run_id }}-${{ github.run_attempt }}
14+
15+
jobs:
16+
linux_e2e_on_nightly:
17+
name: E2E on Nightly
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- name: AMD/HIP
23+
runner: '["Linux", "amdgpu"]'
24+
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build
25+
extra_cmake_args: -DHIP_PLATFORM="AMD" -DAMD_ARCH="gfx1031"
26+
extra_image_opts: --device=/dev/kfd
27+
target_devices: all
28+
29+
- name: Intel
30+
runner: '["Linux", "gen9"]'
31+
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:latest
32+
extra_cmake_args:
33+
extra_image_opts: -u 1001
34+
target_devices: all
35+
36+
- name: ESIMD Emu
37+
runner: '["Linux", "x86-cpu"]'
38+
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:latest
39+
extra_cmake_args:
40+
extra_image_opts: -u 1001
41+
target_devices: ext_intel_esimd_emulator:gpu
42+
uses: ./.github/workflows/linux_single_e2e_on_nightly.yml
43+
with:
44+
name: ${{ matrix.name }}
45+
runner: ${{ matrix. runner }}
46+
image: ${{ matrix.image }}
47+
extra_cmake_args: ${{ matrix.extra_cmake_args }}
48+
extra_image_opts: ${{ matrix.extra_image_opts }}
49+
target_devices: ${{ matrix.target_devices }}
50+
ref: ${{ inputs.ref }}
51+
52+
aws_start:
53+
name: AWS Start
54+
uses: ./.github/workflows/aws.yml
55+
secrets: inherit
56+
with:
57+
mode: start
58+
runs-on-list: '[{"runs-on":"aws-cuda_${{ inputs.uniq }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]'
59+
60+
linux_e2e_on_nightly_aws:
61+
name: '[AWS][CUDA] E2E on Nightly'
62+
needs: [aws_start]
63+
uses: ./.github/workflows/linux_single_e2e_on_nightly.yml
64+
with:
65+
name: CUDA
66+
runner: '["aws-cuda_${{ inputs.uniq }}"]'
67+
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build
68+
extra_cmake_args:
69+
extra_image_opts: --gpus all
70+
target_devices: all
71+
ref: ${{ inputs.ref }}
72+
73+
aws_stop:
74+
name: AWS Stop
75+
needs: [aws_start, linux_e2e_on_nightly_aws]
76+
if: always()
77+
uses: ./.github/workflows/aws.yml
78+
secrets: inherit
79+
with:
80+
mode: stop
81+
runs-on-list: '[{"runs-on":"aws-cuda_${{ inputs.uniq }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]'
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: SYCL E2E on Nightly build
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
name:
7+
type: string
8+
runner:
9+
type: string
10+
image:
11+
type: string
12+
extra_cmake_args:
13+
type: string
14+
extra_image_opts:
15+
type: string
16+
target_devices:
17+
type: string
18+
ref:
19+
type: string
20+
21+
jobs:
22+
lin_e2e_only:
23+
name: ${{ inputs.name }}
24+
runs-on: ${{ fromJSON(inputs.runner) }}
25+
container:
26+
image: ${{ inputs.image }}
27+
options: --device=/dev/dri --privileged --cap-add SYS_ADMIN ${{ inputs.extra_image_opts }}
28+
steps:
29+
- uses: actions/checkout@v3
30+
with:
31+
path: llvm
32+
ref: ${{ inputs.ref }}
33+
sparse-checkout: |
34+
devops/actions
35+
sycl/test-e2e
36+
llvm/utils
37+
- name: Register cleanup after job is finished
38+
uses: ./llvm/devops/actions/cleanup
39+
- name: Configure
40+
run: |
41+
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DSYCL_TEST_E2E_TARGETS="${{ inputs.target_devices }}" -DCMAKE_CXX_COMPILER="clang++" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ inputs.extra_cmake_args }}
42+
# opencl:cpu backend won't be visible in the sycl-ls commands below, see the
43+
# comment below referencing https://github.com/actions/runner/issues/1964.
44+
- run: sycl-ls --verbose
45+
- run: SYCL_PI_TRACE=-1 sycl-ls
46+
- name: SYCL End-to-end tests
47+
env:
48+
LIT_OPTS: -v --no-progress-bar --show-unsupported --max-time 3600 --time-tests
49+
shell: bash
50+
run: |
51+
# https://github.com/actions/runner/issues/1964 prevents us from using
52+
# the ENTRYPOINT in the image.
53+
if [ -e /runtimes/oneapi-tbb/env/vars.sh ]; then
54+
source /runtimes/oneapi-tbb/env/vars.sh;
55+
elif [ -e /opt/runtimes/oneapi-tbb/env/vars.sh ]; then
56+
source /opt/runtimes/oneapi-tbb/env/vars.sh;
57+
else
58+
echo "no TBB vars in /opt/runtimes or /runtimes";
59+
fi
60+
ninja -C build-e2e check-sycl-e2e

.github/workflows/sycl_detect_changes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ jobs:
4747
- *xptifw
4848
- *libclc
4949
- 'sycl/*'
50-
- 'sycl/!(test-e2e)/**'
50+
- 'sycl/!(test-e2e|doc)/**'

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 18 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ jobs:
7777
container:
7878
image: ${{ inputs.build_image }}
7979
options: -u 1001:1001
80+
outputs:
81+
build_conclusion: ${{ steps.build.conclusion }}
8082
steps:
8183
# GHA requires relative paths for actions. Copy actions from container root
8284
# to CWD.
@@ -146,6 +148,7 @@ jobs:
146148
run: |
147149
cmake --build $GITHUB_WORKSPACE/build --target check-libdevice
148150
- name: Install
151+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
149152
# TODO replace utility installation with a single CMake target
150153
run: |
151154
cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain
@@ -159,7 +162,7 @@ jobs:
159162
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-profdata
160163
cmake --build $GITHUB_WORKSPACE/build --target install-compiler-rt
161164
- name: Additional Install for "--shared-libs" build
162-
if: ${{ contains(inputs.build_configure_extra_args, '--shared-libs') }}
165+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && contains(inputs.build_configure_extra_args, '--shared-libs') }}
163166
run: |
164167
cmake --build $GITHUB_WORKSPACE/build --target install-clang-libraries
165168
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-libraries
@@ -172,8 +175,10 @@ jobs:
172175
cmake --build $GITHUB_WORKSPACE/build --target install-clang-tidy
173176
174177
- name: Pack toolchain
178+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
175179
run: tar -I 'zstd -9' -cf llvm_sycl.tar.zst -C $GITHUB_WORKSPACE/build/install .
176180
- name: Upload toolchain
181+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
177182
uses: actions/upload-artifact@v3
178183
with:
179184
name: sycl_linux_${{ inputs.build_artifact_suffix }}
@@ -182,30 +187,18 @@ jobs:
182187
aws-start:
183188
name: Start AWS
184189
needs: build
185-
if: ${{ inputs.lts_aws_matrix != '[]' }}
186-
runs-on: ubuntu-20.04
187-
environment: aws
188-
steps:
189-
- name: Setup script
190-
run: |
191-
mkdir -p ./aws-ec2
192-
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/action.yml -P ./aws-ec2
193-
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/aws-ec2.js -P ./aws-ec2
194-
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/package.json -P ./aws-ec2
195-
npm install ./aws-ec2
196-
- name: Start AWS EC2 runners
197-
uses: ./aws-ec2
198-
with:
199-
runs-on-list: ${{ inputs.lts_aws_matrix }}
200-
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
201-
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
202-
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
190+
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' && inputs.lts_aws_matrix != '[]' }}
191+
uses: ./.github/workflows/aws.yml
192+
secrets: inherit
193+
with:
194+
mode: start
195+
runs-on-list: ${{ inputs.lts_aws_matrix }}
203196

204197
e2e-tests:
205198
needs: [build, aws-start]
206199
# Continue if build was successful. If aws-start is not successful all
207200
# AWS tasks will fail, but all non-AWS tasks should continue.
208-
if: ${{ always() && needs.build.result == 'success' && inputs.lts_matrix != '[]' }}
201+
if: ${{ always() && needs.build.outputs.build_conclusion == 'success' && inputs.lts_matrix != '[]' }}
209202
strategy:
210203
fail-fast: false
211204
matrix:
@@ -301,21 +294,8 @@ jobs:
301294
# Always attempt to shutdown AWS instance, even if AWS start was not
302295
# successful.
303296
if: ${{ always() && inputs.lts_aws_matrix != '[]' }}
304-
runs-on: ubuntu-20.04
305-
environment: aws
306-
steps:
307-
- name: Setup script
308-
run: |
309-
mkdir -p ./aws-ec2
310-
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/action.yml -P ./aws-ec2
311-
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/aws-ec2.js -P ./aws-ec2
312-
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/aws-ec2/package.json -P ./aws-ec2
313-
npm install ./aws-ec2
314-
- name: Stop AWS EC2 runners
315-
uses: ./aws-ec2
316-
with:
317-
runs-on-list: ${{ inputs.lts_aws_matrix }}
318-
mode: stop
319-
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
320-
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
321-
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
297+
uses: ./.github/workflows/aws.yml
298+
secrets: inherit
299+
with:
300+
mode: stop
301+
runs-on-list: ${{ inputs.lts_aws_matrix }}

.github/workflows/sycl_post_commit.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,7 @@ on:
44
push:
55
branches:
66
- sycl
7-
pull_request:
8-
branches:
9-
- sycl
10-
paths:
11-
- .github/workflows/sycl_post_commit.yml
12-
- .github/workflows/sycl_gen_test_matrix.yml
13-
- .github/workflows/sycl_linux_build_and_test.yml
14-
- .github/workflows/sycl_windows_build_and_test.yml
15-
- .github/workflows/sycl_macos_build_and_test.yml
16-
workflow_dispatch:
7+
- test-devops-pr/**
178

189
jobs:
1910
# This job generates matrix of tests for SYCL End-to-End tests

.github/workflows/sycl_precommit.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ jobs:
3939
steps:
4040
- uses: actions/checkout@v3
4141
with:
42+
ref: ${{ github.base_ref }}
4243
sparse-checkout: |
4344
devops/actions/cached_checkout
45+
devops/actions/clang-format
4446
- name: 'PR commits + 2'
4547
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 2 ))" >> "${GITHUB_ENV}"
4648
- uses: ./devops/actions/cached_checkout
@@ -51,7 +53,7 @@ jobs:
5153
cache_path: "/__w/repo_cache/"
5254
merge: false
5355
- name: Run clang-format
54-
uses: ./src/devops/actions/clang-format
56+
uses: ./devops/actions/clang-format
5557
with:
5658
path: src
5759

@@ -68,7 +70,7 @@ jobs:
6870
# Only build and test patches, that have passed all linter checks, because
6971
# the next commit is likely to be a follow-up on that job.
7072
needs: [lint, test_matrix, detect_changes]
71-
if: always() && (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
73+
if: ${{ always() && (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint')) && contains(needs.detect_changes.outputs.filters, 'sycl') }}
7274
uses: ./.github/workflows/sycl_linux_build_and_test.yml
7375
secrets: inherit
7476
with:
@@ -81,6 +83,15 @@ jobs:
8183
lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}
8284
check_filters: ${{ needs.detect_changes.outputs.filters }}
8385

86+
linux_e2e_on_nightly:
87+
name: Linux SYCL E2E on Nightly
88+
needs: [detect_changes]
89+
if: ${{ !contains(needs.detect_changes.outputs.filters, 'sycl') }}
90+
uses: ./.github/workflows/linux_matrix_e2e_on_nightly.yml
91+
secrets: inherit
92+
with:
93+
ref: ${{ github.event.pull_request.head.sha }}
94+
8495
windows_default:
8596
name: Windows
8697
needs: [lint, test_matrix, detect_changes]

clang/lib/Driver/Driver.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,6 +1571,10 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
15711571
}
15721572
}
15731573

1574+
if (Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false) &&
1575+
CCCIsCC())
1576+
setDriverMode("g++");
1577+
15741578
// Check for working directory option before accessing any files
15751579
if (Arg *WD = Args.getLastArg(options::OPT_working_directory))
15761580
if (VFS->setCurrentWorkingDirectory(WD->getValue()))
@@ -6950,7 +6954,7 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
69506954
types::isSrcFile(I.first))) {
69516955
// Unique ID is generated for source files and preprocessed files.
69526956
SmallString<128> ResultID;
6953-
llvm::sys::fs::createUniquePath("%%%%%%%%%%%%%%%%", ResultID, false);
6957+
llvm::sys::fs::createUniquePath("uid%%%%%%%%%%%%%%%%", ResultID, false);
69546958
addSYCLUniqueID(Args.MakeArgString(ResultID.str()), SrcFileName);
69556959
}
69566960
if (!types::isSrcFile(I.first))

0 commit comments

Comments
 (0)