Skip to content

Commit d436af2

Browse files
committed
merge latest sycl branch and fix conflicts
Signed-off-by: gejin <[email protected]>
2 parents cccff98 + 6e9bf3b commit d436af2

File tree

3,535 files changed

+160997
-54131
lines changed

Some content is hidden

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

3,535 files changed

+160997
-54131
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
}

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: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ ocl_gpu_rt_ver=20.29.17408
1010
# https://downloadmirror.intel.com/29674/a08/igfx_win10_100.8336.zip
1111
ocl_gpu_rt_ver_win=27.20.100.8336
1212
intel_sycl_ver=build
13-
# TODO provide URL for Linux TBB driver
13+
# https://github.com/oneapi-src/oneTBB/releases/download/v2021.1-beta08/oneapi-tbb-2021.1-beta08-lin.tgz
1414
tbb_ver=2021.1.8.515
15-
# TODO provide URL for Windows TBB driver
15+
# https://github.com/oneapi-src/oneTBB/releases/download/v2021.1-beta08/oneapi-tbb-2021.1-beta08-win.zip
1616
tbb_ver_win=2021.1.8.514
1717
# https://github.com/intel/llvm/releases/download/2020-WW31/fpgaemu-2020.10.7.0.15_rel.tar.gz
1818
ocl_fpga_emu_ver=2020.10.7.0.15
@@ -31,3 +31,16 @@ fpga_driver_win=2020.10.7.0.15
3131
# NVidia CUDA driver
3232
# TODO provide URL for CUDA driver
3333
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/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/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
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,8 @@ void ClangMoveTool::run(const ast_matchers::MatchFinder::MatchResult &Result) {
675675
Result.Nodes.getNodeAs<NamedDecl>("helper_decls")) {
676676
MovedDecls.push_back(ND);
677677
HelperDeclarations.push_back(ND);
678-
LLVM_DEBUG(llvm::dbgs() << "Add helper : " << ND->getNameAsString() << " ("
679-
<< ND << ")\n");
678+
LLVM_DEBUG(llvm::dbgs()
679+
<< "Add helper : " << ND->getDeclName() << " (" << ND << ")\n");
680680
} else if (const auto *UD = Result.Nodes.getNodeAs<NamedDecl>("using_decl")) {
681681
MovedDecls.push_back(UD);
682682
}
@@ -735,12 +735,12 @@ void ClangMoveTool::removeDeclsInOldFiles() {
735735
// We remove the helper declarations which are not used in the old.cc after
736736
// moving the given declarations.
737737
for (const auto *D : HelperDeclarations) {
738-
LLVM_DEBUG(llvm::dbgs() << "Check helper is used: "
739-
<< D->getNameAsString() << " (" << D << ")\n");
738+
LLVM_DEBUG(llvm::dbgs() << "Check helper is used: " << D->getDeclName()
739+
<< " (" << D << ")\n");
740740
if (!UsedDecls.count(HelperDeclRGBuilder::getOutmostClassOrFunDecl(
741741
D->getCanonicalDecl()))) {
742742
LLVM_DEBUG(llvm::dbgs() << "Helper removed in old.cc: "
743-
<< D->getNameAsString() << " (" << D << ")\n");
743+
<< D->getDeclName() << " (" << D << ")\n");
744744
RemovedDecls.push_back(D);
745745
}
746746
}
@@ -820,7 +820,7 @@ void ClangMoveTool::moveDeclsToNewFiles() {
820820
D->getCanonicalDecl())))
821821
continue;
822822

823-
LLVM_DEBUG(llvm::dbgs() << "Helper used in new.cc: " << D->getNameAsString()
823+
LLVM_DEBUG(llvm::dbgs() << "Helper used in new.cc: " << D->getDeclName()
824824
<< " " << D << "\n");
825825
ActualNewCCDecls.push_back(D);
826826
}

0 commit comments

Comments
 (0)