Skip to content

Commit d07e3b4

Browse files
Merge branch 'sycl' into programmutex
Signed-off-by: Sergey Semenov <sergey.semenov@intel.com>
2 parents 98ad98c + afa80bf commit d07e3b4

File tree

8,642 files changed

+383278
-128543
lines changed

Some content is hidden

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

8,642 files changed

+383278
-128543
lines changed

.git-blame-ignore-revs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@
1616

1717
# r280751: [Coding style change][lldb] Moved LLDB code base to use LLVM style
1818
b9c1b51e45b845debb76d8658edabca70ca56079
19+
20+
# r302421: That change incorrectly changed line endings in some libc++ files
21+
9669df28d4fd3c52d09f451186bd217cdc3322c0
22+
23+
# r302496: That is the revert of r302421
24+
ff63090b0e1072bd398b8efef8ae2291613a6ec9

.github/CODEOWNERS

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
* @bader
2+
3+
clang/ @erichkeane @Fznamznon
4+
5+
clang/**/Driver @mdtoguchi @AGindinson
6+
7+
llvm-spirv/ @AlexeySotkin @AlexeySachkov
8+
9+
opencl-aot/ @dm-vodopyanov @AlexeySachkov @romanovvlad
10+
11+
libdevice/ @asavonic @vzakhari
12+
13+
sycl/ @romanovvlad @bader
14+
15+
sycl/doc/ @pvchupin @kbobrovs
16+
17+
sycl/doc/extensions/ @mkinsner @jbrodman
18+
19+
xpti/ @tovinkere @andykaylor

.github/workflows/gh_pages.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Generate Doxygen documentation
2+
3+
on:
4+
schedule:
5+
- cron: 0 1 * * *
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
ref: sycl
14+
path: repo
15+
- name: Install deps
16+
run: |
17+
sudo apt-get install -y doxygen graphviz ssh ninja-build
18+
sudo pip3 install 'sphinx==3.0.0' 'recommonmark==0.6.0' 'sphinx_markdown_tables==0.0.12'
19+
- name: Build Docs
20+
run: |
21+
mkdir -p $GITHUB_WORKSPACE/build
22+
cd $GITHUB_WORKSPACE/build
23+
python $GITHUB_WORKSPACE/repo/buildbot/configure.py -w $GITHUB_WORKSPACE \
24+
-s $GITHUB_WORKSPACE/repo -o $GITHUB_WORKSPACE/build -t Release --docs
25+
cmake --build . --target doxygen-sycl
26+
cmake --build . --target docs-sycl-html
27+
- name: Deploy
28+
env:
29+
SSH_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}}
30+
run: |
31+
mkdir -p ~/.ssh
32+
echo "$SSH_KEY" > ~/.ssh/id_rsa
33+
chmod 600 ~/.ssh/id_rsa
34+
eval "$(ssh-agent -s)"
35+
ssh-add -k ~/.ssh/id_rsa
36+
git clone git@github.com:intel/llvm-docs.git docs
37+
cd $GITHUB_WORKSPACE/docs
38+
git rm -rf .
39+
touch .nojekyll
40+
yes | \cp -rf $GITHUB_WORKSPACE/build/tools/sycl/doc/html/* .
41+
mkdir doxygen
42+
yes | \cp -rf $GITHUB_WORKSPACE/build/tools/sycl/doc/doxygen/html/* doxygen/
43+
git config --global user.name "iclsrc"
44+
git config --global user.email "ia.compiler.tools.git@intel.com"
45+
git add .
46+
git diff-index --quiet HEAD || git commit -m "Update docs" -s
47+
git push
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Linux Post Commit Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- sycl
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
config: ["Default", "SharedLibs", "NoAssertions"]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
path: src
19+
- name: Install Ubuntu deps
20+
run: sudo apt install -y ninja-build
21+
- name: Configure
22+
run: |
23+
CONFIG=${{ matrix.config }}
24+
case $CONFIG in
25+
Default)
26+
export ARGS=""
27+
;;
28+
SharedLibs)
29+
export ARGS="--shared-libs"
30+
;;
31+
NoAssertions)
32+
export ARGS="--no-assertions"
33+
;;
34+
esac
35+
mkdir -p $GITHUB_WORKSPACE/build
36+
cd $GITHUB_WORKSPACE/build
37+
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
38+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release $ARGS
39+
- name: Compile
40+
run: |
41+
python3 $GITHUB_WORKSPACE/src/buildbot/compile.py -w $GITHUB_WORKSPACE \
42+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build
43+
- name: check-llvm
44+
if: always()
45+
run: |
46+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
47+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm
48+
- name: check-clang
49+
if: always()
50+
run: |
51+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
52+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-clang
53+
- name: check-sycl
54+
if: always()
55+
run: |
56+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
57+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-sycl
58+
- name: check-llvm-spirv
59+
if: always()
60+
run: |
61+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
62+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm-spirv
63+
- name: Pack
64+
run: tar -czvf llvm_sycl.tar.gz -C $GITHUB_WORKSPACE/build/install .
65+
- name: Upload artifacts
66+
uses: actions/upload-artifact@v1
67+
with:
68+
name: sycl_linux_${{ matrix.config }}
69+
path: llvm_sycl.tar.gz
70+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
# Nested build directory
2525
/build*
26+
!buildbot
2627

2728
#==============================================================================#
2829
# Explicit files to ignore (only matches one).

CONTRIBUTING.md

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Contributing
22

33
## License
4-
Intel Project for LLVM* technology is licensed under the terms of the
4+
Intel Project for LLVM\* technology is licensed under the terms of the
55
Apache-2.0 with LLVM-exception license ([LICENSE.txt](llvm/LICENSE.TXT))
66
to ensure our ability to contribute this project to the LLVM project
77
under the same license.
@@ -69,23 +69,41 @@ commit automatically with `git commit -s`.
6969

7070
### Development
7171

72+
**NB**: For any changes not related to DPC++, but rather to LLVM in general, it
73+
is strongly encouraged that you submit the patch to https://llvm.org/ directly.
74+
See [LLVM contribution guidelines](https://llvm.org/docs/Contributing.html)
75+
for more information.
76+
7277
- Create a personal fork of the project on GitHub
73-
- Use **sycl** branch as baseline for your changes
78+
- For the DPC++ Compiler project, use **sycl** branch as baseline for your
79+
changes. See [Get Started Guide](sycl/doc/GetStartedGuide.md).
7480
- Prepare your patch (follow
75-
[LLVM coding standards](https://llvm.org/docs/CodingStandards.html))
76-
- Build the project and run all tests (see
77-
[GetStartedWithSYCLCompiler.md](sycl/doc/GetStartedWithSYCLCompiler.md))
81+
[LLVM coding standards](https://llvm.org/docs/CodingStandards.html)).
82+
[clang-format](https://clang.llvm.org/docs/ClangFormat.html) and [clang-tidy](
83+
https://clang.llvm.org/extra/clang-tidy/) tools can be integrated into your
84+
workflow to ensure formatting and stylistic compliance of your changes.
85+
- Build the project and run all tests.
86+
87+
### Commit message
88+
89+
- When writing your commit message, please make sure to follow
90+
[LLVM developer policies](
91+
https://llvm.org/docs/DeveloperPolicy.html#commit-messages) on the subject.
92+
- For any DPC++-related commit, the `[SYCL]` tag should be present in the
93+
commit message title. To a reasonable extent, additional tags can be used
94+
to signify the component changed, e.g.: `[PI]`, `[CUDA]`, `[Doc]`.
7895

7996
### Review and acceptance testing
8097

8198
- Create a pull request for your changes following [Creating a pull request
82-
instructions](https://help.github.com/articles/creating-a-pull-request/)
83-
- CI will run signed-off check as soon as PR is created, see **check_pr** CI
84-
check for results
85-
- CI will run build and functional testing check as soon as PR is approved by
86-
Intel representative
87-
- New approval is needed if PR was updated (e.g. during code review)
88-
- Once PR is approved and all checks pass, the pull request is ready for merge
99+
instructions](https://help.github.com/articles/creating-a-pull-request/).
100+
- CI will run a signed-off check as soon as your PR is created - see the
101+
**check_pr** CI action results.
102+
- CI will run several build and functional testing checks as soon as the PR is
103+
approved by an Intel representative.
104+
- A new approval is needed if the PR was updated (e.g. during code review).
105+
- Once the PR is approved and all checks have passed, the pull request is
106+
ready for merge.
89107

90108
### Merge
91109

@@ -94,4 +112,7 @@ Project maintainers merge pull requests using one of the following options:
94112
- [Squash and merge] Used when there are multiple commits in the PR
95113
- Squashing is done to make sure that the project is buildable on any commit
96114
- [Create a merge commit] Used for LLVM pull-down PRs to preserve hashes of the
97-
commits pulled from the LLVM community repository
115+
commits pulled from the LLVM community repository
116+
117+
118+
*Other names and brands may be claimed as the property of others.

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
1-
# Intel Project for LLVM* technology
1+
# Intel Project for LLVM\* technology
22

33
## Introduction
44

55
Intel staging area for llvm.org contribution.
66
Home for Intel LLVM-based projects:
7-
- SYCL* Compiler and Runtimes - compiler and runtime libraries for SYCL ([https://www.khronos.org/sycl/](https://www.khronos.org/sycl/)). See **sycl** branch.
7+
- oneAPI Data Parallel C++ compiler - see **sycl** branch. More information on
8+
oneAPI and DPC++ is available at
9+
([https://www.oneapi.com/](https://www.oneapi.com/))
10+
- [![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22) [![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)
11+
12+
813

914
## License
1015
See [LICENSE.txt](sycl/LICENSE.TXT) for details.
1116

12-
1317
## Contributing
1418
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
1519

1620
## Sub-projects Documentation
17-
- SYCL Compiler and Runtimes - See [GetStartedWithSYCLCompiler.md](sycl/doc/GetStartedWithSYCLCompiler.md)
21+
- oneAPI Data Parallel C++ compiler - See
22+
[GetStartedGuide.md](sycl/doc/GetStartedGuide.md)
1823

19-
*Other names and brands may be claimed as the property of others.
24+
## DPC++ extensions
2025

21-
## SYCL Extension Proposal Documents
26+
DPC++ is an open, cross-architecture language built upon the ISO C++ and Khronos
27+
SYCL\* standards. DPC++ extends these standards with a number of extensions,
28+
which can be found in [sycl/doc/extensions](sycl/doc/extensions) directory.
2229

23-
See [sycl/doc/extensions](sycl/doc/extensions)
30+
\*Other names and brands may be claimed as the property of others.
2431

buildbot/check.py

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,41 @@
11
import argparse
22
import os
3+
import multiprocessing
34
import subprocess
45
import sys
56

67
DEFAULT_CPU_COUNT = 4
78

89
def do_check(args):
9-
ret = False
10-
11-
cpu_count = os.cpu_count()
12-
if cpu_count is None:
10+
try:
11+
cpu_count = multiprocessing.cpu_count()
12+
except NotImplementedError:
1313
cpu_count = DEFAULT_CPU_COUNT
1414

15+
# Get absolute path to source directory
16+
if args.src_dir:
17+
abs_src_dir = os.path.abspath(args.src_dir)
18+
else:
19+
abs_src_dir = os.path.abspath(os.path.join(__file__, "../.."))
20+
# Get absolute path to build directory
21+
if args.obj_dir:
22+
abs_obj_dir = os.path.abspath(args.obj_dir)
23+
else:
24+
abs_obj_dir = os.path.join(abs_src_dir, "build")
25+
26+
cmake_cmd = [
27+
"cmake",
28+
"--build", abs_obj_dir,
29+
"--",
30+
args.test_suite,
31+
"-j", str(cpu_count)]
32+
33+
print(cmake_cmd)
34+
1535
env_tmp=os.environ
1636
env_tmp["LIT_ARGS"]="\"{}\"".format("-v")
1737

18-
make_cmd = ["ninja", args.test_suite, "-j", str(cpu_count)]
19-
print(make_cmd)
20-
21-
subprocess.check_call(make_cmd, cwd=args.obj_dir, env=env_tmp)
38+
subprocess.check_call(cmake_cmd, cwd=abs_obj_dir, env=env_tmp)
2239

2340
ret = True
2441
return ret
@@ -34,8 +51,8 @@ def main():
3451
parser.add_argument("-w", "--builder-dir", metavar="BUILDER_DIR",
3552
help="builder directory, which is the directory contains source and build directories")
3653
parser.add_argument("-s", "--src-dir", metavar="SRC_DIR", help="source directory")
37-
parser.add_argument("-o", "--obj-dir", metavar="OBJ_DIR", required=True, help="build directory")
38-
parser.add_argument("-t", "--test-suite", metavar="TEST_SUITE", required=True, help="check-xxx target")
54+
parser.add_argument("-o", "--obj-dir", metavar="OBJ_DIR", help="build directory")
55+
parser.add_argument("-t", "--test-suite", metavar="TEST_SUITE", default="check-all", help="check-xxx target")
3956

4057
args = parser.parse_args()
4158

@@ -47,4 +64,3 @@ def main():
4764
ret = main()
4865
exit_code = 0 if ret else 1
4966
sys.exit(exit_code)
50-

buildbot/compile.py

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,40 @@
11
import argparse
2-
import os
2+
import multiprocessing
33
import subprocess
44
import sys
5+
import os
56

67
DEFAULT_CPU_COUNT = 4
78

89

910
def do_compile(args):
10-
cpu_count = os.cpu_count()
11-
if cpu_count is None:
11+
try:
12+
cpu_count = multiprocessing.cpu_count()
13+
except NotImplementedError:
1214
cpu_count = DEFAULT_CPU_COUNT
1315

14-
make_cmd = ["ninja", "-j", str(cpu_count), "deploy-sycl-toolchain", "deploy-opencl-aot"]
15-
print(make_cmd)
16+
# Get absolute path to source directory
17+
if args.src_dir:
18+
abs_src_dir = os.path.abspath(args.src_dir)
19+
else:
20+
abs_src_dir = os.path.abspath(os.path.join(__file__, "../.."))
21+
# Get absolute path to build directory
22+
if args.obj_dir:
23+
abs_obj_dir = os.path.abspath(args.obj_dir)
24+
else:
25+
abs_obj_dir = os.path.join(abs_src_dir, "build")
26+
27+
cmake_cmd = [
28+
"cmake",
29+
"--build", abs_obj_dir,
30+
"--",
31+
"deploy-sycl-toolchain",
32+
"deploy-opencl-aot",
33+
"-j", str(cpu_count)]
1634

17-
subprocess.check_call(make_cmd, cwd=args.obj_dir)
35+
print(cmake_cmd)
36+
37+
subprocess.check_call(cmake_cmd, cwd=abs_obj_dir)
1838

1939
return True
2040

@@ -30,7 +50,7 @@ def main():
3050
parser.add_argument("-w", "--builder-dir", metavar="BUILDER_DIR",
3151
help="builder directory, which is the directory contains source and build directories")
3252
parser.add_argument("-s", "--src-dir", metavar="SRC_DIR", help="source directory")
33-
parser.add_argument("-o", "--obj-dir", metavar="OBJ_DIR", required=True, help="build directory")
53+
parser.add_argument("-o", "--obj-dir", metavar="OBJ_DIR", help="build directory")
3454

3555
args = parser.parse_args()
3656

@@ -43,4 +63,3 @@ def main():
4363
ret = main()
4464
exit_code = 0 if ret else 1
4565
sys.exit(exit_code)
46-

0 commit comments

Comments
 (0)