Skip to content

Commit b9a044b

Browse files
author
Artem Gindinson
authored
Merge branch 'sycl' into private/agindins/templates-refactor
2 parents b4fd5f5 + b04e6a0 commit b9a044b

File tree

17,942 files changed

+2439928
-1107023
lines changed

Some content is hidden

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

17,942 files changed

+2439928
-1107023
lines changed

.arcconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"phabricator.uri" : "https://reviews.llvm.org/",
33
"repository.callsign" : "G",
44
"conduit_uri" : "https://reviews.llvm.org/",
5-
"base": "git:HEAD^"
5+
"base": "git:HEAD^",
6+
"arc.land.onto.default": "main"
67
}

.github/CODEOWNERS

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
* @bader
22

3-
clang/ @Fznamznon @premanandrao @elizabethandrews
3+
# Front-end compiler
4+
clang/ @premanandrao @elizabethandrews
45

6+
# Driver
57
clang/**/Driver @mdtoguchi @AGindinson
68

9+
# LLVM-SPIRV translator
710
llvm-spirv/ @AlexeySotkin @AlexeySachkov
811

12+
# OpenCL "offline" compiler
913
opencl-aot/ @dm-vodopyanov @AlexeySachkov @romanovvlad
1014

11-
libdevice/ @asavonic @vzakhari
12-
13-
sycl/ @intel/llvm-reviewers-runtime
15+
# Device library
16+
libdevice/ @vzakhari
1417

18+
# Documentation
1519
sycl/ReleaseNotes.md @pvchupin
20+
sycl/doc/ @pvchupin @kbobrovs
21+
sycl/doc/extensions/ @intel/dpcpp-specification-reviewers
22+
23+
# DPC++ runtime library
24+
sycl/ @intel/llvm-reviewers-runtime
1625

1726
# USM
1827
sycl/include/CL/sycl/detail/clusm.hpp @jbrodman
@@ -41,6 +50,9 @@ sycl/source/detail/plugin.hpp @smaslov-intel
4150
sycl/source/detail/posix_pi.cpp @smaslov-intel
4251
sycl/source/detail/windows_pi.cpp @smaslov-intel
4352

53+
# CUDA plugin
54+
sycl/plugins/cuda/ @intel/llvm-reviewers-cuda
55+
4456
# Stream
4557
sycl/include/CL/sycl/detail/stream_impl.hpp @againull
4658
sycl/include/CL/sycl/stream.hpp @againull
@@ -78,11 +90,27 @@ sycl/source/half_type.cpp @AlexeySachkov
7890
sycl/include/CL/sycl/swizzles.def @turinevgeny
7991
sycl/include/CL/sycl/types.hpp @turinevgeny
8092

81-
sycl/plugins/cuda/ @intel/llvm-reviewers-cuda
82-
83-
sycl/doc/ @pvchupin @kbobrovs
84-
85-
sycl/doc/extensions/ @intel/dpcpp-specification-reviewers
86-
93+
# XPTI instrumentation utilities
8794
xpti/ @tovinkere @andykaylor
8895
xptifw/ @tovinkere @andykaylor
96+
97+
# DPC++ tools
98+
llvm/**/file-table-tform/ @kbobrovs @AlexeySachkov
99+
llvm/**/llvm-foreach/ @AlexeySachkov @Fznamznon
100+
llvm/**/llvm-no-spir-kernel/ @AGindinson @AlexeySachkov
101+
llvm/**/sycl-post-link/ @kbobrovs @AlexeySachkov
102+
llvm/include/llvm/Support/PropertySetIO.h @kbobrovs @AlexeySachkov
103+
llvm/lib/Support/PropertySetIO.cpp @kbobrovs @AlexeySachkov
104+
llvm/unittests/Support/PropertySetIOTest.cpp @kbobrovs @AlexeySachkov
105+
llvm/lib/Support/Base64.cpp @kbobrovs @AlexeySachkov
106+
107+
# Clang offload tools
108+
clang/tools/clang-offload-bundler/ @kbobrovs @sndmitriev
109+
clang/tools/clang-offload-wrapper/ @sndmitriev @kbobrovs
110+
clang/tools/clang-offload-deps/ @sndmitriev
111+
112+
# Explicit SIMD
113+
SYCLLowerIR/ @kbobrovs @DenisBakhvalov
114+
esimd/ @kbobrovs @DenisBakhvalov
115+
sycl/include/CL/sycl/INTEL/esimd.hpp @kbobrovs @DenisBakhvalov
116+
sycl/doc/extensions/ExplicitSIMD/ @kbobrovs

.github/lockdown.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Configuration for Repo Lockdown - https://github.com/dessant/repo-lockdown
2+
3+
skipCreatedBefore: "2020-03-21"
4+
5+
pulls:
6+
comment: >
7+
This repository does not accept pull requests.
8+
Please follow http://llvm.org/docs/Contributing.html#how-to-submit-a-patch for contribution to LLVM.

.github/workflows/linux_post_commit.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ jobs:
2626
export ARGS=""
2727
;;
2828
SharedLibs)
29+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
30+
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main"
31+
sudo apt-get update
32+
sudo apt-get install -y clang-13
2933
export ARGS="--shared-libs"
34+
export CC="clang-13"
35+
export CXX="clang++-13"
3036
;;
3137
NoAssertions)
3238
export ARGS="--no-assertions"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: main branch sync
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
8+
jobs:
9+
branch_sync:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v2
14+
with:
15+
# persist-credentials: false allows us to use our own credentials for
16+
# pushing to the repository. Otherwise, the default github actions token
17+
# is used.
18+
persist-credentials: false
19+
fetch-depth: 0
20+
21+
- name: Update branch
22+
env:
23+
LLVMBOT_TOKEN: ${{ secrets.LLVMBOT_MAIN_SYNC }}
24+
run: |
25+
git push https://[email protected]/${{ github.repository }} HEAD:master

.github/workflows/sync-main.yml

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

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
#OS X specific files.
2222
.DS_store
2323

24+
# Ignore the user specified CMake presets in subproject directories.
25+
/*/CMakeUserPresets.json
26+
2427
# Nested build directory
2528
/build*
2629
!buildbot
@@ -64,3 +67,5 @@ pythonenv*
6467
/clang/utils/analyzer/projects/*/PatchedSource
6568
/clang/utils/analyzer/projects/*/ScanBuildResults
6669
/clang/utils/analyzer/projects/*/RefScanBuildResults
70+
# automodapi puts generated documentation files here.
71+
/lldb/docs/python_api/

CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,63 @@ see [ABI Policy Guide](sycl/doc/ABIPolicyGuide.md) for more information.
5454
- Run regression tests -
5555
[instructions](sycl/doc/GetStartedGuide.md#test-dpc-toolchain).
5656

57+
### Tests development
58+
59+
Every product change should be accompanied with corresponding test modification
60+
(adding new test(s), extending, removing or modifying existing test(s)).
61+
62+
There are 3 types of tests which are used for DPC++ toolchain validation:
63+
* DPC++ in-tree LIT tests including [check-llvm](../../llvm/test),
64+
[check-clang](../../clang/test), [check-llvm-spirv](../../llvm-spirv/test) and
65+
[check-sycl](../../sycl/test) targets stored in this repository. These tests
66+
should not have hardware (e.g. GPU, FPGA, etc.) or external software
67+
dependencies (e.g. OpenCL, Level Zero, CUDA runtimes). All tests not following
68+
this approach should be moved to DPC++ end-to-end or SYCL-CTS tests.
69+
However, the tests for a feature under active development requiring atomic
70+
change for tests and product can be put to
71+
[sycl/test/on-device](../../sycl/test/on-device) temporarily. It is developer
72+
responsibility to move the tests to DPC++ E2E test suite or SYCL-CTS once
73+
the feature is stabilized.
74+
75+
**Guidelines for adding DPC++ in-tree LIT tests (DPC++ Clang FE tests)**:
76+
- Use `sycl::` namespace instead of `cl::sycl::`
77+
78+
- Include sycl mock headers as system headers.
79+
Example: `-internal-isystem %S/Inputs`
80+
`#include "sycl.hpp"`
81+
82+
- Use SYCL functions for invoking kernels from the mock header `(single_task, parallel_for, parallel_for_work_group)`
83+
Example:
84+
```bash
85+
`#include "Inputs/sycl.hpp"`
86+
sycl::queue q;
87+
q.submit([&](cl::sycl::handler &h) {
88+
h.single_task( { //code });
89+
});
90+
```
91+
92+
- Add a helpful comment describing what the test does at the beginning and other comments throughout the test as necessary.
93+
94+
- Try to follow descriptive naming convention for variables, functions as much as possible.
95+
Please refer [LLVM naming convention](https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly)
96+
97+
* DPC++ end-to-end (E2E) tests which are extension to
98+
[LLVM\* test suite](https://github.com/intel/llvm-test-suite/tree/intel/SYCL).
99+
A test which requires full stack including backend runtimes (e.g. OpenCL,
100+
Level Zero or CUDA) should be put to DPC++ E2E test suite following
101+
[CONTRIBUTING](https://github.com/intel/llvm-test-suite/blob/intel/CONTRIBUTING.md).
102+
103+
* SYCL-CTS are official
104+
[Khronos\* SYCL\* conformance tests](https://github.com/KhronosGroup/SYCL-CTS).
105+
They verify SYCL specification compatibility. All implementation details or
106+
extensions are out of scope for the tests. If SYCL specification has changed
107+
(SYCL CTS tests conflict with recent version of SYCL specification) or change
108+
is required in the way the tests are built with DPC++ compiler (defined in
109+
[FindIntel_SYCL](https://github.com/KhronosGroup/SYCL-CTS/blob/SYCL-1.2.1/master/cmake/FindIntel_SYCL.cmake))
110+
pull request should be created under
111+
[KhronosGroup/SYCL-CTS](https://github.com/KhronosGroup/SYCL-CTS) with required
112+
patch.
113+
57114
### Commit message
58115
59116
- When writing your commit message, please make sure to follow
@@ -62,6 +119,14 @@ see [ABI Policy Guide](sycl/doc/ABIPolicyGuide.md) for more information.
62119
- For any DPC++-related commit, the `[SYCL]` tag should be present in the
63120
commit message title. To a reasonable extent, additional tags can be used
64121
to signify the component changed, e.g.: `[PI]`, `[CUDA]`, `[Doc]`.
122+
- For product changes which require modification in tests outside of the current repository
123+
(see [Test DPC++ toolchain](sycl/doc/GetStartedGuide.md#test-dpc-toolchain)),
124+
the commit message should contain the link to corresponding test PR, e.g.: E2E
125+
test changes are available under intel/llvm-test-suite#88 or SYCL
126+
conformance test changes are available under KhronosGroup/SYCL-CTS#65 (see
127+
[Autolinked references and URLs](https://docs.github.com/en/free-pro-team/github/writing-on-github/autolinked-references-and-urls)
128+
for more details). The same message should be present both in commit
129+
message and in PR description.
65130
66131
### Review and acceptance testing
67132

buildbot/check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def main():
4949
parser.add_argument("-d", "--base-branch", metavar="BASE_BRANCH", help="pull request base branch")
5050
parser.add_argument("-r", "--pr-number", metavar="PR_NUM", help="pull request number")
5151
parser.add_argument("-w", "--builder-dir", metavar="BUILDER_DIR",
52-
help="builder directory, which is the directory contains source and build directories")
52+
help="builder directory, which is the directory containing source and build directories")
5353
parser.add_argument("-s", "--src-dir", metavar="SRC_DIR", help="source directory")
5454
parser.add_argument("-o", "--obj-dir", metavar="OBJ_DIR", help="build directory")
5555
parser.add_argument("-t", "--test-suite", metavar="TEST_SUITE", default="check-all", help="check-xxx target")

buildbot/clang_tidy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def main():
5151
help="pull request base branch")
5252
parser.add_argument("-r", "--pr-number", metavar="PR_NUM", help="pull request number")
5353
parser.add_argument("-w", "--builder-dir", metavar="BUILDER_DIR", required=True,
54-
help="builder directory, which is the directory contains source and build directories")
54+
help="builder directory, which is the directory containing source and build directories")
5555
parser.add_argument("-s", "--src-dir", metavar="SRC_DIR", required=True, help="source directory")
5656
parser.add_argument("-o", "--obj-dir", metavar="OBJ_DIR", required=True, help="build directory")
5757

0 commit comments

Comments
 (0)