Skip to content

Commit 5ad1785

Browse files
committed
Weekly pulldown from origin/sycl to origin/SYCLomatic
2 parents 15fe0e8 + 4f75718 commit 5ad1785

File tree

219 files changed

+12240
-3760
lines changed

Some content is hidden

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

219 files changed

+12240
-3760
lines changed

.github/CODEOWNERS

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,92 @@
1+
<<<<<<< HEAD
12
##SYCLomatic
23
clang/ @oneapi-src/syclomatic-reviewers
4+
=======
5+
* @bader
6+
7+
# Front-end compiler
8+
clang/ @intel/dpcpp-cfe-reviewers
9+
10+
# Clang driver
11+
clang/**/Driver/ @intel/dpcpp-clang-driver-reviewers
12+
13+
# Clang tools
14+
clang-tools-extra/ @intel/dpcpp-cfe-reviewers
15+
16+
# LLVM-SPIRV translator
17+
llvm-spirv/ @intel/dpcpp-spirv-reviewers
18+
19+
# OpenCL deps
20+
opencl/ @intel/llvm-reviewers-runtime
21+
22+
# OpenCL "offline" compiler
23+
opencl/opencl-aot/ @intel/dpcpp-tools-reviewers
24+
25+
# libclc library
26+
libclc/ @intel/llvm-reviewers-cuda
27+
28+
# Device library
29+
libdevice/ @intel/llvm-reviewers-runtime
30+
31+
# DPC++ runtime library
32+
sycl/ @intel/llvm-reviewers-runtime
33+
34+
# Documentation
35+
sycl/ReleaseNotes.md @intel/dpcpp-doc-reviewers @tfzhu
36+
sycl/doc/ @intel/dpcpp-doc-reviewers
37+
sycl/doc/design/ @intel/dpcpp-specification-reviewers
38+
sycl/doc/design/spirv-extensions/ @intel/dpcpp-spirv-doc-reviewers
39+
sycl/doc/extensions/ @intel/dpcpp-specification-reviewers
40+
41+
# Level Zero plugin
42+
sycl/plugins/level_zero/ @intel/dpcpp-l0-pi-reviewers
43+
44+
# ESIMD CPU emulator plug-in
45+
sycl/plugins/esimd_emulator/ @intel/dpcpp-esimd-reviewers
46+
47+
# CUDA plugin
48+
sycl/plugins/cuda/ @intel/llvm-reviewers-cuda
49+
50+
# XPTI instrumentation utilities
51+
xpti/ @intel/llvm-reviewers-runtime
52+
xptifw/ @intel/llvm-reviewers-runtime
53+
54+
# DPC++ tools
55+
llvm/ @intel/dpcpp-tools-reviewers
56+
57+
# OpenCL CPU RT
58+
opencl-cpu/ @intel/ocl-cpu-rt-write
59+
60+
# SYCL transform passes
61+
llvm/lib/Transforms/SYCLTransforms/ @intel/ocl-cpu-rt-write
62+
63+
# SYCL transform passes header files
64+
llvm/include/llvm/Transforms/SYCLTransforms/ @intel/ocl-cpu-rt-write
65+
66+
# SYCL transform passes LIT test
67+
llvm/test/Transforms/SYCLTransforms/ @intel/ocl-cpu-rt-write
68+
69+
# Clang offload tools
70+
clang/tools/clang-offload-*/ @intel/dpcpp-tools-reviewers
71+
72+
# Explicit SIMD
73+
ESIMD/ @intel/dpcpp-esimd-reviewers
74+
esimd/ @intel/dpcpp-esimd-reviewers
75+
sycl/include/sycl/ext/intel/esimd.hpp @intel/dpcpp-esimd-reviewers
76+
sycl/doc/extensions/experimental/sycl_ext_intel_esimd/ @intel/dpcpp-esimd-reviewers
77+
llvm/lib/SYCLLowerIR/CMakeLists.txt @intel/dpcpp-tools-reviewers @intel/dpcpp-esimd-reviewers
78+
79+
# invoke_simd
80+
sycl/include/sycl/ext/oneapi/experimental/invoke_simd.hpp @intel/dpcpp-esimd-reviewers @rolandschulz
81+
sycl/include/std/experimental/simd.hpp @intel/dpcpp-esimd-reviewers @rolandschulz
82+
llvm/lib/SYCLLowerIR/LowerInvokeSimd.cpp @intel/dpcpp-esimd-reviewers
83+
llvm/include/llvm/SYCLLowerIR/LowerInvokeSimd.h @intel/dpcpp-esimd-reviewers
84+
85+
# DevOps configs
86+
.github/workflows/ @intel/dpcpp-devops-reviewers
87+
buildbot/ @intel/dpcpp-devops-reviewers
88+
devops/ @intel/dpcpp-devops-reviewers
89+
90+
# Kernel fusion JIT compiler
91+
sycl-fusion/ @victor-eds @Naghasan @sommerlukas
92+
>>>>>>> upstream/sycl
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: SYCL Post Commit
2+
3+
on:
4+
push:
5+
branches:
6+
- 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:
17+
18+
jobs:
19+
# This job generates matrix of tests for LLVM Test Suite
20+
test_matrix:
21+
name: Generate Test Matrix
22+
if: github.repository == 'intel/llvm'
23+
uses: ./.github/workflows/sycl_gen_test_matrix.yml
24+
with:
25+
lts_config: "l0_gen9"
26+
cts_config: "cuda"
27+
linux_default:
28+
name: Linux Default
29+
if: github.repository == 'intel/llvm'
30+
needs: test_matrix
31+
uses: ./.github/workflows/sycl_linux_build_and_test.yml
32+
secrets: inherit
33+
with:
34+
build_cache_root: "/__w/llvm"
35+
build_artifact_suffix: "post_commit"
36+
lts_matrix: ${{ needs.test_matrix.outputs.lts_matrix }}
37+
cts_matrix: ${{ needs.test_matrix.outputs.cts_matrix }}
38+
lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}
39+
build_configure_extra_args: --hip --cuda --enable-esimd-emulator --cmake-opt="-DSYCL_ENABLE_STACK_PRINTING=ON" --cmake-opt="-DSYCL_LIB_WITH_DEBUG_SYMBOL=ON"
40+
linux_no_assert:
41+
name: Linux (no assert)
42+
if: github.repository == 'intel/llvm'
43+
uses: ./.github/workflows/sycl_linux_build_and_test.yml
44+
secrets: inherit
45+
with:
46+
build_cache_root: "/__w/llvm"
47+
build_cache_suffix: gcc_no_assertions
48+
build_artifact_suffix: gcc_no_assertions
49+
build_configure_extra_args: --no-assertions
50+
linux_clang_shared_libs:
51+
# TODO use nightly images when Docker containers are available
52+
name: Linux + Clang + Shared libs
53+
runs-on: ubuntu-20.04
54+
if: github.repository == 'intel/llvm'
55+
steps:
56+
- uses: actions/checkout@v3
57+
with:
58+
path: src
59+
- name: Install Ubuntu deps
60+
run: sudo apt install -y ninja-build ccache
61+
- name: Setup Cache
62+
uses: actions/cache@v3
63+
id: cache
64+
with:
65+
path: ${{ github.workspace }}/cache
66+
key: build-linux-shared-libs-${{ github.sha }}
67+
restore-keys: |
68+
build-linux-shared-libs-
69+
- name: Configure
70+
run: |
71+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
72+
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main"
73+
sudo apt-get update
74+
sudo apt-get install -y clang-15
75+
export CC="clang-15"
76+
export CXX="clang++-15"
77+
mkdir -p $GITHUB_WORKSPACE/build
78+
cd $GITHUB_WORKSPACE/build
79+
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
80+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
81+
--ci-defaults --shared-libs --cmake-opt="-DLLVM_CCACHE_BUILD=ON" \
82+
--cmake-opt="-DLLVM_CCACHE_DIR=$GITHUB_WORKSPACE/cache" \
83+
--cmake-opt="-DLLVM_CCACHE_MAXSIZE=2G"
84+
- name: Compile
85+
run: |
86+
python3 $GITHUB_WORKSPACE/src/buildbot/compile.py -w $GITHUB_WORKSPACE \
87+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build
88+
- name: check-llvm
89+
if: always()
90+
run: |
91+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
92+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm
93+
- name: check-clang
94+
if: always()
95+
run: |
96+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
97+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-clang
98+
- name: check-sycl
99+
if: always()
100+
run: |
101+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
102+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-sycl
103+
- name: check-llvm-spirv
104+
if: always()
105+
run: |
106+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
107+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm-spirv
108+
- name: check-xptifw
109+
if: always()
110+
run: |
111+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
112+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-xptifw
113+
- name: Pack
114+
run: tar -czvf llvm_sycl.tar.gz -C $GITHUB_WORKSPACE/build/install .
115+
- name: Upload artifacts
116+
uses: actions/upload-artifact@v3
117+
with:
118+
name: sycl_linux_${{ matrix.config }}
119+
path: llvm_sycl.tar.gz
120+
121+
windows_default:
122+
name: Windows
123+
if: github.repository == 'intel/llvm'
124+
uses: ./.github/workflows/sycl_windows_build_and_test.yml
125+
126+
macos_default:
127+
name: macOS
128+
if: github.repository == 'intel/llvm'
129+
uses: ./.github/workflows/sycl_macos_build_and_test.yml

.github/workflows/sync-main.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: automatic sync main branch from llvm-project to llvm
2+
3+
on:
4+
schedule:
5+
- cron: '0 */1 * * *'
6+
jobs:
7+
sync:
8+
runs-on: ubuntu-20.04
9+
if: github.repository == 'intel/llvm'
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
# persist-credentials: false allows us to use our own credentials for
14+
# pushing to the repository. Otherwise, the default github actions token
15+
# is used.
16+
persist-credentials: false
17+
fetch-depth: 0
18+
path: src
19+
- name: Sync
20+
env:
21+
BRANCH: main
22+
SYNC_REPO: https://github.com/llvm/llvm-project
23+
LLVMBOT_TOKEN: ${{ secrets.LLVM_MAIN_SYNC_BBSYCL_TOKEN }}
24+
run: |
25+
cd $GITHUB_WORKSPACE/src
26+
branch_exist=`git ls-remote --heads origin $BRANCH | wc -l`
27+
if [ $branch_exist -ne 0 ]; then
28+
git checkout $BRANCH
29+
git pull --ff --ff-only $SYNC_REPO $BRANCH
30+
if [ $? -ne 0 ]; then
31+
echo "failed to pull from $SYNC_REPO $BRANCH, abort"
32+
exit 1
33+
fi
34+
git_status=`git rev-list --count --left-right origin/$BRANCH...$BRANCH`
35+
if [ "0 0" == "$git_status" ] ; then
36+
echo "no change, skip"
37+
elif [[ "$git_status" = 0* ]] ; then
38+
git push https://[email protected]/${{ github.repository }} ${BRANCH}
39+
else
40+
echo "$BRANCH branch invalid state"
41+
exit 1
42+
fi
43+
else
44+
git remote add upstream $SYNC_REPO
45+
git fetch upstream
46+
git checkout -B $BRANCH upstream/$BRANCH
47+
git push https://[email protected]/${{ github.repository }} ${BRANCH}
48+
fi
49+
echo "sync finished"

.github/workflows/windows_test_comment_trigger.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,25 @@ jobs:
1010
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/testwin' }}
1111
steps:
1212
- name: react_to_comment
13-
uses: actions/github-script@v4
13+
uses: actions/github-script@v6
1414
with:
1515
script: |
16-
const {owner, repo} = context.issue;
17-
github.reactions.createForIssueComment({
18-
owner,
19-
repo,
16+
github.rest.reactions.createForIssueComment({
17+
owner: context.issue.owner,
18+
repo: context.issue.repo,
2019
comment_id: context.payload.comment.id,
21-
content: "rocket",
20+
content: "rocket"
2221
});
2322
- name: get_pr_sha
2423
id: sha
25-
uses: actions/github-script@v4
24+
uses: actions/github-script@v6
2625
with:
2726
result-encoding: string
2827
script: |
29-
const { owner, repo, number } = context.issue;
30-
const pr = await github.pulls.get({
31-
owner,
32-
repo,
33-
pull_number: number,
28+
const pr = await github.rest.pulls.get({
29+
owner: context.issue.owner,
30+
repo: context.issue.repo,
31+
pull_number: number
3432
});
3533
return pr.data.head.sha
3634
- name: update_pr_status_pending

clang/include/clang/Basic/Attr.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,12 +1333,12 @@ def SYCLType: InheritableAttr {
13331333
"specialization_id", "kernel_handler", "buffer_location",
13341334
"no_alias", "accessor_property_list", "group",
13351335
"private_memory", "aspect", "annotated_ptr", "annotated_arg",
1336-
"stream", "sampler"],
1336+
"stream", "sampler", "host_pipe"],
13371337
["accessor", "local_accessor", "spec_constant",
13381338
"specialization_id", "kernel_handler", "buffer_location",
13391339
"no_alias", "accessor_property_list", "group",
13401340
"private_memory", "aspect", "annotated_ptr", "annotated_arg",
1341-
"stream", "sampler"]>];
1341+
"stream", "sampler", "host_pipe"]>];
13421342
// Only used internally by SYCL implementation
13431343
let Documentation = [InternalOnly];
13441344
}

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,10 @@ CODEGENOPT(CtorDtorReturnThis, 1, 0)
515515
/// Whether to disable the standard optimization pipeline for the SYCL device compiler.
516516
CODEGENOPT(DisableSYCLEarlyOpts, 1, 0)
517517

518+
/// Optimize SYCL Framework functions. These are functions
519+
/// which do not contain "user" code.
520+
CODEGENOPT(OptimizeSYCLFramework, 1, 0)
521+
518522
#undef CODEGENOPT
519523
#undef ENUM_CODEGENOPT
520524
#undef VALUE_CODEGENOPT

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,8 @@ def warn_drv_sycl_target_missing : Warning<
364364
InGroup<SyclTarget>;
365365
def err_drv_no_rdc_sycl_target_missing : Error<
366366
"linked binaries do not contain expected '%0' target; found targets: '%1', this is not supported with '-fno-sycl-rdc'">;
367+
def err_drv_fsycl_wrong_optimization_options : Error<
368+
"-fsycl-optimize-non-user-code option can be used only in conjunction with %0">;
367369
def err_drv_multiple_target_with_forced_target : Error<
368370
"multiple target usage with '%0' is not supported with '%1'">;
369371
def err_drv_failed_to_deduce_target_from_arch : Error<

clang/include/clang/Driver/Options.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3034,6 +3034,10 @@ def fsycl_max_parallel_jobs_EQ : Joined<["-"], "fsycl-max-parallel-link-jobs=">,
30343034
"or AOT compilation of each device image.">;
30353035
def : Flag<["-"], "fsycl-rdc">, Flags<[CoreOption]>, Alias<fgpu_rdc>;
30363036
def : Flag<["-"], "fno-sycl-rdc">, Flags<[CoreOption]>, Alias<fno_gpu_rdc>;
3037+
def fsycl_optimize_non_user_code : Flag<["-"], "fsycl-optimize-non-user-code">,
3038+
Flags<[CC1Option, CoreOption]>, MarshallingInfoFlag<CodeGenOpts<"OptimizeSYCLFramework">>,
3039+
HelpText<"Option used in conjunction with -O0 to "
3040+
"optimize SYCL framework utility functions and leave user's kernel code unoptimized. (experimental)">;
30373041
def fsyntax_only : Flag<["-"], "fsyntax-only">,
30383042
Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, Group<Action_Group>,
30393043
HelpText<"Run the preprocessor, parser and semantic analysis stages">;

clang/include/clang/Sema/Sema.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,13 @@ class SYCLIntegrationHeader {
371371
NeedToEmitDeviceGlobalRegistration = true;
372372
}
373373

374+
/// Signals that emission of __sycl_host_pipe_registration type and
375+
/// declaration of variable __sycl_host_pipe_registrar of this type in
376+
/// integration header is required.
377+
void addHostPipeRegistration() {
378+
NeedToEmitHostPipeRegistration = true;
379+
}
380+
374381
private:
375382
// Kernel actual parameter descriptor.
376383
struct KernelParamDesc {
@@ -454,6 +461,10 @@ class SYCLIntegrationHeader {
454461
/// Keeps track of whether declaration of __sycl_device_global_registration
455462
/// type and __sycl_device_global_registrar variable are required to emit.
456463
bool NeedToEmitDeviceGlobalRegistration = false;
464+
465+
/// Keeps track of whether declaration of __sycl_host_pipe_registration
466+
/// type and __sycl_host_pipe_registrar variable are required to emit.
467+
bool NeedToEmitHostPipeRegistration = false;
457468
};
458469

459470
class SYCLIntegrationFooter {

0 commit comments

Comments
 (0)