Skip to content

Commit

Permalink
Merge branch 'sycl' into stuart/basic_tests/image
Browse files Browse the repository at this point in the history
  • Loading branch information
bader authored Oct 12, 2020
2 parents c998785 + c00c1fa commit f48edc2
Show file tree
Hide file tree
Showing 18,174 changed files with 1,484,176 additions and 360,476 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .arclint
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"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",
"include": [
"(\\.(cc|cpp|h)$)"
],
"exclude": [
"(^clang/test/)"
]
}
}
Expand Down
18 changes: 18 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,21 @@ b9c1b51e45b845debb76d8658edabca70ca56079

# r302496: That is the revert of r302421
ff63090b0e1072bd398b8efef8ae2291613a6ec9

# Fix more line endings changed in r320089. NFC.
d8f0e6caa91e230a486c948ab643174e40bdf215

# Correct line endings that got mixed up in r320089; NFC.
29dc5ded45447915d96ef7ca3f02acf2232282e0

# Remove line-endings added by r320089. NFC.
100a0eedc00b2bf48bcdc6c209c000745a4a0e48

# Cleanup __config indention. NFC.
2b772b930e097ed6f06d698a51e291c7fd318baa

# Fixing whitespace problems
94b2dd0998230c758abd92c99d3700c971f7a31a

# Wiped out some non-ascii characters that snuck into the copyright.
5b08a8a43254ed30bd953e869b0fd9fc1e8b82d0
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ sycl/source/stream.cpp @againull

# Specialization constant
sycl/include/CL/sycl/detail/sycl_fe_intrins.hpp @kbobrovs
sycl/include/CL/sycl/detail/spec_constant_impl.hpp @kbobrovs
sycl/include/CL/sycl/experimental/spec_constant.hpp @kbobrovs
sycl/source/detail/spec_constant_impl.hpp @kbobrovs

# Program manager
sycl/source/detail/program_manager @kbobrovs
Expand Down Expand Up @@ -82,7 +82,7 @@ sycl/plugins/cuda/ @intel/llvm-reviewers-cuda

sycl/doc/ @pvchupin @kbobrovs

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

xpti/ @tovinkere @andykaylor
xptifw/ @tovinkere @andykaylor
6 changes: 3 additions & 3 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get clang-format first
run: sudo apt-get install -yqq clang-format-9

- uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Get clang-format first
run: sudo apt-get install -yqq clang-format-9

- name: Run clang-format for the patch
run: |
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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/gh_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'intel/llvm'
steps:
- uses: actions/checkout@v2
with:
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ autoconf/autom4te.cache
# VS2017 and VSCode config files.
.vscode
.vs
# clangd index
.clangd
# pythonenv for github Codespaces
pythonenv*
# clangd index. (".clangd" is a config file now, thus trailing slash)
.clangd/
.cache
# static analyzer regression testing project files
/clang/utils/analyzer/projects/*/CachedSource
/clang/utils/analyzer/projects/*/PatchedSource
Expand Down
38 changes: 20 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,25 @@ for more information.
- For the DPC++ Compiler project, use **sycl** branch as baseline for your
changes. See [Get Started Guide](sycl/doc/GetStartedGuide.md).
- Prepare your patch
- follow [LLVM coding standards](https://llvm.org/docs/CodingStandards.html)
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) tools can be
integrated into your workflow to ensure formatting and stylistic
compliance of your changes.
- use
```
./clang/tools/clang-format/git-clang-format `git merge-base origin/sycl HEAD`
```
to check the format of your current changes against the `origin/sycl`
branch.
- `-f` to also correct unstaged changes
- `--diff` to only print the diff without applying
- Build the project and run all tests.
- complete test suite: `python buildbot/check.py`
- sycl test suite `python buildbot/check.py -t test-sycl`
- run only "mytest" test `python buildbot/check.py -t test-sycl-mytest`
- if necessary, use `-o $LLVM_BUILD_DIR` to specify the llvm build directory
- follow [LLVM coding standards](https://llvm.org/docs/CodingStandards.html)
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) tools can be
integrated into your workflow to ensure formatting and stylistic
compliance of your changes.
- use

```bash
./clang/tools/clang-format/git-clang-format `git merge-base origin/sycl HEAD`
```

to check the format of your current changes against the `origin/sycl`
branch.
- `-f` to also correct unstaged changes
- `--diff` to only print the diff without applying
- Build the project following
[Get Started Guide instructions](sycl/doc/GetStartedGuide.md#build-dpc-toolchain).
- Run regression tests -
[instructions](sycl/doc/GetStartedGuide.md#test-dpc-toolchain).

### Commit message

Expand All @@ -67,6 +68,7 @@ ready for merge.
### Merge

Project maintainers merge pull requests using one of the following options:

- [Rebase and merge] The preferable choice for PRs containing a single commit
- [Squash and merge] Used when there are multiple commits in the PR
- Squashing is done to make sure that the project is buildable on any commit
Expand Down
4 changes: 4 additions & 0 deletions buildbot/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ def do_compile(args):
except NotImplementedError:
cpu_count = DEFAULT_CPU_COUNT

if args.build_parallelism:
cpu_count = int(args.build_parallelism)

# Get absolute path to source directory
if args.src_dir:
abs_src_dir = os.path.abspath(args.src_dir)
Expand Down Expand Up @@ -51,6 +54,7 @@ def main():
help="builder directory, which is the directory contains source and build directories")
parser.add_argument("-s", "--src-dir", metavar="SRC_DIR", help="source directory")
parser.add_argument("-o", "--obj-dir", metavar="OBJ_DIR", help="build directory")
parser.add_argument("-j", "--build-parallelism", metavar="BUILD_PARALLELISM", help="build parallelism")

args = parser.parse_args()

Expand Down
5 changes: 5 additions & 0 deletions buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def do_configure(args):
libclc_targets_to_build = 'nvptx64--;nvptx64--nvidiacl'
sycl_build_pi_cuda = 'ON'

# replace not append, so ARM ^ X86
if args.arm:
llvm_targets_to_build = 'ARM;AArch64'

if args.no_werror:
sycl_werror = 'OFF'

Expand Down Expand Up @@ -128,6 +132,7 @@ def main():
parser.add_argument("-t", "--build-type",
metavar="BUILD_TYPE", default="Release", help="build type: Debug, Release")
parser.add_argument("--cuda", action='store_true', help="switch from OpenCL to CUDA")
parser.add_argument("--arm", action='store_true', help="build ARM support rather than x86")
parser.add_argument("--no-assertions", action='store_true', help="build without assertions")
parser.add_argument("--docs", action='store_true', help="build Doxygen documentation")
parser.add_argument("--system-ocl", action='store_true', help="use OpenCL deps from system (no download)")
Expand Down
63 changes: 39 additions & 24 deletions buildbot/dependency.conf
Original file line number Diff line number Diff line change
@@ -1,31 +1,46 @@
[VERSIONS]
# https://github.com/intel/llvm/releases/download/2020-WW20/oclcpuexp-2020.10.6.0.4_rel.tar.gz
ocl_cpu_rt_ver=2020.10.6.0.04
# https://github.com/intel/llvm/releases/download/2020-WW20/win-oclcpuexp-2020.10.6.0.4_rel.zip
ocl_cpu_rt_ver_win=2020.10.6.0.04
# https://github.com/intel/llvm/releases/download/2020-WW41/oclcpuexp-2020.11.10.0.05_rel.tar.gz
ocl_cpu_rt_ver=2020.11.10.0.05
# https://github.com/intel/llvm/releases/download/2020-WW41/win-oclcpuexp-2020.11.10.0.05_rel.zip
ocl_cpu_rt_ver_win=2020.11.10.0.05
# Same GPU driver supports Level Zero and OpenCL:
# https://github.com/intel/compute-runtime/releases/tag/20.21.16886
ocl_gpu_rt_ver=20.21.16886
# https://github.com/intel/compute-runtime/releases/tag/20.39.17972
ocl_gpu_rt_ver=20.39.17972
# Same GPU driver supports Level Zero and OpenCL:
# https://downloadmirror.intel.com/29616/a08/igfx_win10_100.8280.zip
ocl_gpu_rt_ver_win=27.20.100.8280
# https://downloadmirror.intel.com/29879/a08/igfx_win10_100.8778.zip
ocl_gpu_rt_ver_win=27.20.100.8778
intel_sycl_ver=build
# https://github.com/oneapi-src/oneTBB/releases/download/v2020.2/tbb-2020.2-lin.tgz
tbb_ver=20200121_111047
# https://github.com/oneapi-src/oneTBB/releases/download/v2020.2/tbb-2020.2-win.zip
tbb_ver_win=20200124_000000
# TODO: provide URL for Linux OpenCL emulator of FPGA device
fpga_ver=20200216_000000
# TODO: provide URL for Windows OpenCL emulator of FPGA device
fpga_ver_win=20200216_000000
# https://github.com/oneapi-src/oneTBB/releases/download/v2021.1-beta08/oneapi-tbb-2021.1-beta08-lin.tgz
tbb_ver=2021.1.10.2267
# https://github.com/oneapi-src/oneTBB/releases/download/v2021.1-beta08/oneapi-tbb-2021.1-beta08-win.zip
tbb_ver_win=2021.1.10.2267
# https://github.com/intel/llvm/releases/download/2020-WW41/fpgaemu-2020.11.10.0.05_rel.tar.gz
ocl_fpga_emu_ver=2020.11.10.0.05
# https://github.com/intel/llvm/releases/download/2020-WW41/win-fpgaemu-2020.11.10.0.05_rel.zip
ocl_fpga_emu_ver_win=2020.11.10.0.05
fpga_ver=20200913_000017
fpga_ver_win=20200913_000017

[DRIVER VERSIONS]
cpu_driver_lin=2020.10.6.0.04
cpu_driver_win=2020.10.6.0.04
gpu_driver_lin=20.21.16886
gpu_driver_win=27.20.100.8280
fpga_driver_lin=2020.9.2.0
fpga_driver_win=2020.9.2.0
cpu_driver_lin=2020.11.10.0.05
cpu_driver_win=2020.11.10.0.05
gpu_driver_lin=20.39.17972
gpu_driver_win=27.20.100.8778
fpga_driver_lin=2020.11.10.0.05
fpga_driver_win=2020.11.10.0.05
# NVidia CUDA driver
# http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-drivers_450.36.06-1_amd64.deb
nvidia_gpu_driver_lin=450.36.06
# TODO provide URL for CUDA driver
nvidia_gpu_driver_lin=435.21

[DEPS ROOT]
ocl_cpu_root={DEPS_ROOT}/opencl/runtime/linux/oclcpu
ocl_gpu_root={DEPS_ROOT}/opencl/runtime/linux/oclgpu
fpga_root={ARCHIVE_ROOT}/comp/oclfpga/linux
ocl_fpga_emu_root={DEPS_ROOT}/opencl/runtime/linux/oclfpgaemu
tbb_root={DEPS_ROOT}/tbb/lin

ocl_cpu_root_win={DEPS_ROOT}/opencl/runtime/win/oclcpu
ocl_gpu_root_win=
fpga_root_win={ARCHIVE_ROOT}/comp/oclfpga/win
ocl_fpga_emu_root_win={DEPS_ROOT}/opencl/runtime/win/oclfpgaemu
tbb_root_win={DEPS_ROOT}/tbb/win
5 changes: 4 additions & 1 deletion buildbot/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ def do_dependency(args):
# fetch and build OpenCL ICD loader
icd_loader_dir = os.path.join(args.obj_dir, "OpenCL-ICD-Loader")
if not os.path.isdir(icd_loader_dir):
clone_cmd = ["git", "clone", "https://github.com/KhronosGroup/OpenCL-ICD-Loader", "OpenCL-ICD-Loader"]
clone_cmd = ["git", "clone",
"https://github.com/KhronosGroup/OpenCL-ICD-Loader",
"OpenCL-ICD-Loader", "-b", "v2020.06.16"]

subprocess.check_call(clone_cmd, cwd=args.obj_dir)
else:
fetch_cmd = ["git", "pull", "--ff", "--ff-only", "origin"]
Expand Down
26 changes: 26 additions & 0 deletions buildbot/linux.vrd
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# For TBB
:eadb LD_LIBRARY_PATH={TBBROOT}/{TBBVER}/lib/intel64/gcc4.8

# For CPU
:eadb LD_LIBRARY_PATH={OCLCPUROOT}/{OCLCPUVER}/intel64_lin
:eadb OCL_ICD_FILENAMES={OCLCPUROOT}/{OCLCPUVER}/intel64_lin/libintelocl.so

# For GPU
:eade LD_LIBRARY_PATH={OCLGPUROOT}/{OCLGPUVER}
:eade PATH={OCLGPUROOT}/{OCLGPUVER}
:eade OCL_ICD_FILENAMES={OCLGPUROOT}/{OCLGPUVER}/libigdrcl.so

# For FPGA
:eadb PATH={OCLFPGAROOT}/{OCLFPGAVER}/build/bin

# For FPGA EMU
:eadb LD_LIBRARY_PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}
:eadb LD_LIBRARY_PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/intel64_lin
:eadb PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/bin
:eadb OCL_ICD_FILENAMES={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/libintelocl_emu.so

# For Compiler
:eadb PATH={COMP_ROOT}/bin
:eadb LD_LIBRARY_PATH={COMP_ROOT}/lib
:eadb PATH={COMP_ROOT}/install/bin
:eadb LD_LIBRARY_PATH={COMP_ROOT}/install/lib
23 changes: 23 additions & 0 deletions buildbot/windows.vrd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# For TBB
:eadb PATH={TBBROOT}/{TBBVER}/redist/intel64/vc14
:eadb LIB={TBBROOT}/{TBBVER}/lib/intel64/vc14
:eadb INCLUDE={TBBROOT}/{TBBVER}/include
:eadb CPATH={TBBROOT}/{TBBVER}/include

# For CPU
:eadb PATH={OCLCPUROOT}/{OCLCPUVER}/intel64_win
:eadb OCL_ICD_FILENAMES={OCLCPUROOT}/{OCLCPUVER}/intel64_win/intelocl64.dll

# For FPGA
:eadb PATH={OCLFPGAROOT}/{OCLFPGAVER}/build/bin

# For FPGA EMU
:eadb PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/bin
:eadb PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/intel64_win
:eadb OCL_ICD_FILENAMES={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/intelocl64_emu.dll

# For Compiler
:eadb PATH={COMP_ROOT}/bin
:eadb PATH={COMP_ROOT}/lib
:eadb PATH={COMP_ROOT}/install/bin
:eadb PATH={COMP_ROOT}/install/lib
3 changes: 3 additions & 0 deletions clang-tools-extra/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
include(CMakeDependentOption)

option(CLANG_TIDY_ENABLE_STATIC_ANALYZER
"Include static analyzer checks in clang-tidy" ON)

add_subdirectory(clang-apply-replacements)
add_subdirectory(clang-reorder-fields)
add_subdirectory(modularize)
Expand Down
10 changes: 2 additions & 8 deletions clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ namespace change_namespace {

namespace {

inline std::string
joinNamespaces(const llvm::SmallVectorImpl<StringRef> &Namespaces) {
if (Namespaces.empty())
return "";
std::string Result(Namespaces.front());
for (auto I = Namespaces.begin() + 1, E = Namespaces.end(); I != E; ++I)
Result += ("::" + *I).str();
return Result;
inline std::string joinNamespaces(ArrayRef<StringRef> Namespaces) {
return llvm::join(Namespaces, "::");
}

// Given "a::b::c", returns {"a", "b", "c"}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ CreateSymbolInfo(const NamedDecl *ND, const SourceManager &SM,

SourceLocation Loc = SM.getExpansionLoc(ND->getLocation());
if (!Loc.isValid()) {
llvm::errs() << "Declaration " << ND->getNameAsString() << "("
llvm::errs() << "Declaration " << ND->getDeclName() << "("
<< ND->getDeclKindName()
<< ") has invalid declaration location.";
return llvm::None;
Expand Down
4 changes: 2 additions & 2 deletions clang-tools-extra/clang-move/HelperDeclRefGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void HelperDeclRGBuilder::run(
const auto *DC = Result.Nodes.getNodeAs<Decl>("dc");
assert(DC);
LLVM_DEBUG(llvm::dbgs() << "Find helper function usage: "
<< FuncRef->getDecl()->getNameAsString() << " ("
<< FuncRef->getDecl()->getDeclName() << " ("
<< FuncRef->getDecl() << ")\n");
RG->addEdge(
getOutmostClassOrFunDecl(DC->getCanonicalDecl()),
Expand All @@ -126,7 +126,7 @@ void HelperDeclRGBuilder::run(
const auto *DC = Result.Nodes.getNodeAs<Decl>("dc");
assert(DC);
LLVM_DEBUG(llvm::dbgs()
<< "Find helper class usage: " << UsedClass->getNameAsString()
<< "Find helper class usage: " << UsedClass->getDeclName()
<< " (" << UsedClass << ")\n");
RG->addEdge(getOutmostClassOrFunDecl(DC->getCanonicalDecl()), UsedClass);
}
Expand Down
Loading

0 comments on commit f48edc2

Please sign in to comment.