Skip to content

Commit f48edc2

Browse files
authored
Merge branch 'sycl' into stuart/basic_tests/image
2 parents c998785 + c00c1fa commit f48edc2

File tree

18,174 files changed

+1484176
-360476
lines changed

Some content is hidden

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

18,174 files changed

+1484176
-360476
lines changed

.arclint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"script-and-regex.regex": "/^(?P<severity>[[:alpha:]]+)\n(?P<message>[^\n]+)\n(====|(?P<line>\\d),(?P<char>\\d)\n(?P<original>.*)>>>>\n(?P<replacement>.*)<<<<\n)$/s",
77
"include": [
88
"(\\.(cc|cpp|h)$)"
9+
],
10+
"exclude": [
11+
"(^clang/test/)"
912
]
1013
}
1114
}

.git-blame-ignore-revs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,21 @@ b9c1b51e45b845debb76d8658edabca70ca56079
2222

2323
# r302496: That is the revert of r302421
2424
ff63090b0e1072bd398b8efef8ae2291613a6ec9
25+
26+
# Fix more line endings changed in r320089. NFC.
27+
d8f0e6caa91e230a486c948ab643174e40bdf215
28+
29+
# Correct line endings that got mixed up in r320089; NFC.
30+
29dc5ded45447915d96ef7ca3f02acf2232282e0
31+
32+
# Remove line-endings added by r320089. NFC.
33+
100a0eedc00b2bf48bcdc6c209c000745a4a0e48
34+
35+
# Cleanup __config indention. NFC.
36+
2b772b930e097ed6f06d698a51e291c7fd318baa
37+
38+
# Fixing whitespace problems
39+
94b2dd0998230c758abd92c99d3700c971f7a31a
40+
41+
# Wiped out some non-ascii characters that snuck into the copyright.
42+
5b08a8a43254ed30bd953e869b0fd9fc1e8b82d0

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ sycl/source/stream.cpp @againull
4949

5050
# Specialization constant
5151
sycl/include/CL/sycl/detail/sycl_fe_intrins.hpp @kbobrovs
52-
sycl/include/CL/sycl/detail/spec_constant_impl.hpp @kbobrovs
5352
sycl/include/CL/sycl/experimental/spec_constant.hpp @kbobrovs
53+
sycl/source/detail/spec_constant_impl.hpp @kbobrovs
5454

5555
# Program manager
5656
sycl/source/detail/program_manager @kbobrovs
@@ -82,7 +82,7 @@ sycl/plugins/cuda/ @intel/llvm-reviewers-cuda
8282

8383
sycl/doc/ @pvchupin @kbobrovs
8484

85-
sycl/doc/extensions/ @mkinsner @jbrodman
85+
sycl/doc/extensions/ @intel/dpcpp-specification-reviewers
8686

8787
xpti/ @tovinkere @andykaylor
8888
xptifw/ @tovinkere @andykaylor

.github/workflows/clang-format.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: Get clang-format first
13+
run: sudo apt-get install -yqq clang-format-9
14+
1215
- uses: actions/checkout@v2
1316
with:
1417
fetch-depth: 2
1518

16-
- name: Get clang-format first
17-
run: sudo apt-get install -yqq clang-format-9
18-
1919
- name: Run clang-format for the patch
2020
run: |
2121
git diff -U0 --no-color ${GITHUB_SHA}^1 ${GITHUB_SHA} -- | ./clang/tools/clang-format/clang-format-diff.py -p1 -binary clang-format-9 > ./clang-format.patch

.github/workflows/gh_pages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10+
if: github.repository == 'intel/llvm'
1011
steps:
1112
- uses: actions/checkout@v2
1213
with:

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ autoconf/autom4te.cache
5454
# VS2017 and VSCode config files.
5555
.vscode
5656
.vs
57-
# clangd index
58-
.clangd
57+
# pythonenv for github Codespaces
58+
pythonenv*
59+
# clangd index. (".clangd" is a config file now, thus trailing slash)
60+
.clangd/
61+
.cache
5962
# static analyzer regression testing project files
6063
/clang/utils/analyzer/projects/*/CachedSource
6164
/clang/utils/analyzer/projects/*/PatchedSource

CONTRIBUTING.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,25 @@ for more information.
2424
- For the DPC++ Compiler project, use **sycl** branch as baseline for your
2525
changes. See [Get Started Guide](sycl/doc/GetStartedGuide.md).
2626
- Prepare your patch
27-
- follow [LLVM coding standards](https://llvm.org/docs/CodingStandards.html)
28-
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
29-
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) tools can be
30-
integrated into your workflow to ensure formatting and stylistic
31-
compliance of your changes.
32-
- use
33-
```
34-
./clang/tools/clang-format/git-clang-format `git merge-base origin/sycl HEAD`
35-
```
36-
to check the format of your current changes against the `origin/sycl`
37-
branch.
38-
- `-f` to also correct unstaged changes
39-
- `--diff` to only print the diff without applying
40-
- Build the project and run all tests.
41-
- complete test suite: `python buildbot/check.py`
42-
- sycl test suite `python buildbot/check.py -t test-sycl`
43-
- run only "mytest" test `python buildbot/check.py -t test-sycl-mytest`
44-
- if necessary, use `-o $LLVM_BUILD_DIR` to specify the llvm build directory
27+
- follow [LLVM coding standards](https://llvm.org/docs/CodingStandards.html)
28+
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
29+
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) tools can be
30+
integrated into your workflow to ensure formatting and stylistic
31+
compliance of your changes.
32+
- use
33+
34+
```bash
35+
./clang/tools/clang-format/git-clang-format `git merge-base origin/sycl HEAD`
36+
```
37+
38+
to check the format of your current changes against the `origin/sycl`
39+
branch.
40+
- `-f` to also correct unstaged changes
41+
- `--diff` to only print the diff without applying
42+
- Build the project following
43+
[Get Started Guide instructions](sycl/doc/GetStartedGuide.md#build-dpc-toolchain).
44+
- Run regression tests -
45+
[instructions](sycl/doc/GetStartedGuide.md#test-dpc-toolchain).
4546

4647
### Commit message
4748

@@ -67,6 +68,7 @@ ready for merge.
6768
### Merge
6869

6970
Project maintainers merge pull requests using one of the following options:
71+
7072
- [Rebase and merge] The preferable choice for PRs containing a single commit
7173
- [Squash and merge] Used when there are multiple commits in the PR
7274
- Squashing is done to make sure that the project is buildable on any commit

buildbot/compile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ def do_compile(args):
1313
except NotImplementedError:
1414
cpu_count = DEFAULT_CPU_COUNT
1515

16+
if args.build_parallelism:
17+
cpu_count = int(args.build_parallelism)
18+
1619
# Get absolute path to source directory
1720
if args.src_dir:
1821
abs_src_dir = os.path.abspath(args.src_dir)
@@ -51,6 +54,7 @@ def main():
5154
help="builder directory, which is the directory contains source and build directories")
5255
parser.add_argument("-s", "--src-dir", metavar="SRC_DIR", help="source directory")
5356
parser.add_argument("-o", "--obj-dir", metavar="OBJ_DIR", help="build directory")
57+
parser.add_argument("-j", "--build-parallelism", metavar="BUILD_PARALLELISM", help="build parallelism")
5458

5559
args = parser.parse_args()
5660

buildbot/configure.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def do_configure(args):
3838
libclc_targets_to_build = 'nvptx64--;nvptx64--nvidiacl'
3939
sycl_build_pi_cuda = 'ON'
4040

41+
# replace not append, so ARM ^ X86
42+
if args.arm:
43+
llvm_targets_to_build = 'ARM;AArch64'
44+
4145
if args.no_werror:
4246
sycl_werror = 'OFF'
4347

@@ -128,6 +132,7 @@ def main():
128132
parser.add_argument("-t", "--build-type",
129133
metavar="BUILD_TYPE", default="Release", help="build type: Debug, Release")
130134
parser.add_argument("--cuda", action='store_true', help="switch from OpenCL to CUDA")
135+
parser.add_argument("--arm", action='store_true', help="build ARM support rather than x86")
131136
parser.add_argument("--no-assertions", action='store_true', help="build without assertions")
132137
parser.add_argument("--docs", action='store_true', help="build Doxygen documentation")
133138
parser.add_argument("--system-ocl", action='store_true', help="use OpenCL deps from system (no download)")

buildbot/dependency.conf

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,46 @@
11
[VERSIONS]
2-
# https://github.com/intel/llvm/releases/download/2020-WW20/oclcpuexp-2020.10.6.0.4_rel.tar.gz
3-
ocl_cpu_rt_ver=2020.10.6.0.04
4-
# https://github.com/intel/llvm/releases/download/2020-WW20/win-oclcpuexp-2020.10.6.0.4_rel.zip
5-
ocl_cpu_rt_ver_win=2020.10.6.0.04
2+
# https://github.com/intel/llvm/releases/download/2020-WW41/oclcpuexp-2020.11.10.0.05_rel.tar.gz
3+
ocl_cpu_rt_ver=2020.11.10.0.05
4+
# https://github.com/intel/llvm/releases/download/2020-WW41/win-oclcpuexp-2020.11.10.0.05_rel.zip
5+
ocl_cpu_rt_ver_win=2020.11.10.0.05
66
# Same GPU driver supports Level Zero and OpenCL:
7-
# https://github.com/intel/compute-runtime/releases/tag/20.21.16886
8-
ocl_gpu_rt_ver=20.21.16886
7+
# https://github.com/intel/compute-runtime/releases/tag/20.39.17972
8+
ocl_gpu_rt_ver=20.39.17972
99
# Same GPU driver supports Level Zero and OpenCL:
10-
# https://downloadmirror.intel.com/29616/a08/igfx_win10_100.8280.zip
11-
ocl_gpu_rt_ver_win=27.20.100.8280
10+
# https://downloadmirror.intel.com/29879/a08/igfx_win10_100.8778.zip
11+
ocl_gpu_rt_ver_win=27.20.100.8778
1212
intel_sycl_ver=build
13-
# https://github.com/oneapi-src/oneTBB/releases/download/v2020.2/tbb-2020.2-lin.tgz
14-
tbb_ver=20200121_111047
15-
# https://github.com/oneapi-src/oneTBB/releases/download/v2020.2/tbb-2020.2-win.zip
16-
tbb_ver_win=20200124_000000
17-
# TODO: provide URL for Linux OpenCL emulator of FPGA device
18-
fpga_ver=20200216_000000
19-
# TODO: provide URL for Windows OpenCL emulator of FPGA device
20-
fpga_ver_win=20200216_000000
13+
# https://github.com/oneapi-src/oneTBB/releases/download/v2021.1-beta08/oneapi-tbb-2021.1-beta08-lin.tgz
14+
tbb_ver=2021.1.10.2267
15+
# https://github.com/oneapi-src/oneTBB/releases/download/v2021.1-beta08/oneapi-tbb-2021.1-beta08-win.zip
16+
tbb_ver_win=2021.1.10.2267
17+
# https://github.com/intel/llvm/releases/download/2020-WW41/fpgaemu-2020.11.10.0.05_rel.tar.gz
18+
ocl_fpga_emu_ver=2020.11.10.0.05
19+
# https://github.com/intel/llvm/releases/download/2020-WW41/win-fpgaemu-2020.11.10.0.05_rel.zip
20+
ocl_fpga_emu_ver_win=2020.11.10.0.05
21+
fpga_ver=20200913_000017
22+
fpga_ver_win=20200913_000017
2123

2224
[DRIVER VERSIONS]
23-
cpu_driver_lin=2020.10.6.0.04
24-
cpu_driver_win=2020.10.6.0.04
25-
gpu_driver_lin=20.21.16886
26-
gpu_driver_win=27.20.100.8280
27-
fpga_driver_lin=2020.9.2.0
28-
fpga_driver_win=2020.9.2.0
25+
cpu_driver_lin=2020.11.10.0.05
26+
cpu_driver_win=2020.11.10.0.05
27+
gpu_driver_lin=20.39.17972
28+
gpu_driver_win=27.20.100.8778
29+
fpga_driver_lin=2020.11.10.0.05
30+
fpga_driver_win=2020.11.10.0.05
2931
# NVidia CUDA driver
30-
# http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-drivers_450.36.06-1_amd64.deb
31-
nvidia_gpu_driver_lin=450.36.06
32+
# TODO provide URL for CUDA driver
33+
nvidia_gpu_driver_lin=435.21
34+
35+
[DEPS ROOT]
36+
ocl_cpu_root={DEPS_ROOT}/opencl/runtime/linux/oclcpu
37+
ocl_gpu_root={DEPS_ROOT}/opencl/runtime/linux/oclgpu
38+
fpga_root={ARCHIVE_ROOT}/comp/oclfpga/linux
39+
ocl_fpga_emu_root={DEPS_ROOT}/opencl/runtime/linux/oclfpgaemu
40+
tbb_root={DEPS_ROOT}/tbb/lin
41+
42+
ocl_cpu_root_win={DEPS_ROOT}/opencl/runtime/win/oclcpu
43+
ocl_gpu_root_win=
44+
fpga_root_win={ARCHIVE_ROOT}/comp/oclfpga/win
45+
ocl_fpga_emu_root_win={DEPS_ROOT}/opencl/runtime/win/oclfpgaemu
46+
tbb_root_win={DEPS_ROOT}/tbb/win

buildbot/dependency.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ def do_dependency(args):
5858
# fetch and build OpenCL ICD loader
5959
icd_loader_dir = os.path.join(args.obj_dir, "OpenCL-ICD-Loader")
6060
if not os.path.isdir(icd_loader_dir):
61-
clone_cmd = ["git", "clone", "https://github.com/KhronosGroup/OpenCL-ICD-Loader", "OpenCL-ICD-Loader"]
61+
clone_cmd = ["git", "clone",
62+
"https://github.com/KhronosGroup/OpenCL-ICD-Loader",
63+
"OpenCL-ICD-Loader", "-b", "v2020.06.16"]
64+
6265
subprocess.check_call(clone_cmd, cwd=args.obj_dir)
6366
else:
6467
fetch_cmd = ["git", "pull", "--ff", "--ff-only", "origin"]

buildbot/linux.vrd

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# For TBB
2+
:eadb LD_LIBRARY_PATH={TBBROOT}/{TBBVER}/lib/intel64/gcc4.8
3+
4+
# For CPU
5+
:eadb LD_LIBRARY_PATH={OCLCPUROOT}/{OCLCPUVER}/intel64_lin
6+
:eadb OCL_ICD_FILENAMES={OCLCPUROOT}/{OCLCPUVER}/intel64_lin/libintelocl.so
7+
8+
# For GPU
9+
:eade LD_LIBRARY_PATH={OCLGPUROOT}/{OCLGPUVER}
10+
:eade PATH={OCLGPUROOT}/{OCLGPUVER}
11+
:eade OCL_ICD_FILENAMES={OCLGPUROOT}/{OCLGPUVER}/libigdrcl.so
12+
13+
# For FPGA
14+
:eadb PATH={OCLFPGAROOT}/{OCLFPGAVER}/build/bin
15+
16+
# For FPGA EMU
17+
:eadb LD_LIBRARY_PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}
18+
:eadb LD_LIBRARY_PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/intel64_lin
19+
:eadb PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/bin
20+
:eadb OCL_ICD_FILENAMES={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/libintelocl_emu.so
21+
22+
# For Compiler
23+
:eadb PATH={COMP_ROOT}/bin
24+
:eadb LD_LIBRARY_PATH={COMP_ROOT}/lib
25+
:eadb PATH={COMP_ROOT}/install/bin
26+
:eadb LD_LIBRARY_PATH={COMP_ROOT}/install/lib

buildbot/windows.vrd

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# For TBB
2+
:eadb PATH={TBBROOT}/{TBBVER}/redist/intel64/vc14
3+
:eadb LIB={TBBROOT}/{TBBVER}/lib/intel64/vc14
4+
:eadb INCLUDE={TBBROOT}/{TBBVER}/include
5+
:eadb CPATH={TBBROOT}/{TBBVER}/include
6+
7+
# For CPU
8+
:eadb PATH={OCLCPUROOT}/{OCLCPUVER}/intel64_win
9+
:eadb OCL_ICD_FILENAMES={OCLCPUROOT}/{OCLCPUVER}/intel64_win/intelocl64.dll
10+
11+
# For FPGA
12+
:eadb PATH={OCLFPGAROOT}/{OCLFPGAVER}/build/bin
13+
14+
# For FPGA EMU
15+
:eadb PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/bin
16+
:eadb PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/intel64_win
17+
:eadb OCL_ICD_FILENAMES={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/intelocl64_emu.dll
18+
19+
# For Compiler
20+
:eadb PATH={COMP_ROOT}/bin
21+
:eadb PATH={COMP_ROOT}/lib
22+
:eadb PATH={COMP_ROOT}/install/bin
23+
:eadb PATH={COMP_ROOT}/install/lib

clang-tools-extra/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
include(CMakeDependentOption)
22

3+
option(CLANG_TIDY_ENABLE_STATIC_ANALYZER
4+
"Include static analyzer checks in clang-tidy" ON)
5+
36
add_subdirectory(clang-apply-replacements)
47
add_subdirectory(clang-reorder-fields)
58
add_subdirectory(modularize)

clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,8 @@ namespace change_namespace {
1919

2020
namespace {
2121

22-
inline std::string
23-
joinNamespaces(const llvm::SmallVectorImpl<StringRef> &Namespaces) {
24-
if (Namespaces.empty())
25-
return "";
26-
std::string Result(Namespaces.front());
27-
for (auto I = Namespaces.begin() + 1, E = Namespaces.end(); I != E; ++I)
28-
Result += ("::" + *I).str();
29-
return Result;
22+
inline std::string joinNamespaces(ArrayRef<StringRef> Namespaces) {
23+
return llvm::join(Namespaces, "::");
3024
}
3125

3226
// Given "a::b::c", returns {"a", "b", "c"}.

clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ CreateSymbolInfo(const NamedDecl *ND, const SourceManager &SM,
9999

100100
SourceLocation Loc = SM.getExpansionLoc(ND->getLocation());
101101
if (!Loc.isValid()) {
102-
llvm::errs() << "Declaration " << ND->getNameAsString() << "("
102+
llvm::errs() << "Declaration " << ND->getDeclName() << "("
103103
<< ND->getDeclKindName()
104104
<< ") has invalid declaration location.";
105105
return llvm::None;

clang-tools-extra/clang-move/HelperDeclRefGraph.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void HelperDeclRGBuilder::run(
116116
const auto *DC = Result.Nodes.getNodeAs<Decl>("dc");
117117
assert(DC);
118118
LLVM_DEBUG(llvm::dbgs() << "Find helper function usage: "
119-
<< FuncRef->getDecl()->getNameAsString() << " ("
119+
<< FuncRef->getDecl()->getDeclName() << " ("
120120
<< FuncRef->getDecl() << ")\n");
121121
RG->addEdge(
122122
getOutmostClassOrFunDecl(DC->getCanonicalDecl()),
@@ -126,7 +126,7 @@ void HelperDeclRGBuilder::run(
126126
const auto *DC = Result.Nodes.getNodeAs<Decl>("dc");
127127
assert(DC);
128128
LLVM_DEBUG(llvm::dbgs()
129-
<< "Find helper class usage: " << UsedClass->getNameAsString()
129+
<< "Find helper class usage: " << UsedClass->getDeclName()
130130
<< " (" << UsedClass << ")\n");
131131
RG->addEdge(getOutmostClassOrFunDecl(DC->getCanonicalDecl()), UsedClass);
132132
}

0 commit comments

Comments
 (0)