Skip to content

Commit 028beae

Browse files
author
Alexander Batashev
committed
Merge remote-tracking branch 'upstream/sycl' into xpti_global_objects_revisited
2 parents 10546f1 + e207762 commit 028beae

File tree

7,086 files changed

+333659
-392688
lines changed

Some content is hidden

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

7,086 files changed

+333659
-392688
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ libdevice/ @vzakhari @jinge90
2222
sycl/ @intel/llvm-reviewers-runtime
2323

2424
# Documentation
25-
sycl/ReleaseNotes.md @pvchupin
25+
sycl/ReleaseNotes.md @pvchupin @tfzhu
2626
sycl/doc/ @pvchupin @bader
2727
sycl/doc/extensions/ @intel/dpcpp-specification-reviewers
2828

@@ -73,10 +73,6 @@ sycl/source/function_pointer.cpp @AlexeySachkov
7373
sycl/include/CL/sycl/half_type.hpp @AlexeySachkov
7474
sycl/source/half_type.cpp @AlexeySachkov
7575

76-
# vec and swizzles
77-
sycl/include/CL/sycl/swizzles.def @turinevgeny
78-
sycl/include/CL/sycl/types.hpp @turinevgeny
79-
8076
# XPTI instrumentation utilities
8177
xpti/ @tovinkere @andykaylor @alexbatashev
8278
xptifw/ @tovinkere @andykaylor @alexbatashev

.github/workflows/linux_post_commit.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- sycl
77
jobs:
88
check:
9-
runs-on: ubuntu-18.04
9+
runs-on: ubuntu-20.04
1010
if: github.repository == 'intel/llvm'
1111
strategy:
1212
fail-fast: false
@@ -18,7 +18,15 @@ jobs:
1818
with:
1919
path: src
2020
- name: Install Ubuntu deps
21-
run: sudo apt install -y ninja-build
21+
run: sudo apt install -y ninja-build ccache
22+
- name: Setup Cache
23+
uses: actions/cache@v2
24+
id: cache
25+
with:
26+
path: ${{ github.workspace }}/cache
27+
key: build-${{ runner.os }}-${{ matrix.config }}-${{ github.sha }}
28+
restore-keys: |
29+
build-${{ runner.os }}-${{ matrix.config }}-
2230
- name: Configure
2331
run: |
2432
CONFIG=${{ matrix.config }}
@@ -28,12 +36,12 @@ jobs:
2836
;;
2937
SharedLibs)
3038
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
31-
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main"
39+
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main"
3240
sudo apt-get update
33-
sudo apt-get install -y clang-12
41+
sudo apt-get install -y clang-13
3442
export ARGS="--shared-libs"
35-
export CC="clang-12"
36-
export CXX="clang++-12"
43+
export CC="clang-13"
44+
export CXX="clang++-13"
3745
;;
3846
NoAssertions)
3947
export ARGS="--no-assertions"
@@ -42,7 +50,10 @@ jobs:
4250
mkdir -p $GITHUB_WORKSPACE/build
4351
cd $GITHUB_WORKSPACE/build
4452
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
45-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release $ARGS
53+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
54+
--ci-defaults $ARGS --cmake-opt="-DLLVM_CCACHE_BUILD=ON" \
55+
--cmake-opt="-DLLVM_CCACHE_DIR=$GITHUB_WORKSPACE/cache" \
56+
--cmake-opt="-DLLVM_CCACHE_MAXSIZE=2G"
4657
- name: Compile
4758
run: |
4859
python3 $GITHUB_WORKSPACE/src/buildbot/compile.py -w $GITHUB_WORKSPACE \
@@ -67,11 +78,15 @@ jobs:
6778
run: |
6879
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
6980
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm-spirv
81+
- name: check-xptifw
82+
if: always()
83+
run: |
84+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
85+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-xptifw
7086
- name: Pack
7187
run: tar -czvf llvm_sycl.tar.gz -C $GITHUB_WORKSPACE/build/install .
7288
- name: Upload artifacts
7389
uses: actions/upload-artifact@v1
7490
with:
7591
name: sycl_linux_${{ matrix.config }}
7692
path: llvm_sycl.tar.gz
77-

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ see [ABI Policy Guide](sycl/doc/ABIPolicyGuide.md) for more information.
3838
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
3939
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) tools can be
4040
integrated into your workflow to ensure formatting and stylistic
41-
compliance of your changes.
41+
compliance of your changes. To avoid code formatting misalignment with
42+
GitHub Actions check we recommend using 10 version of clang-format tool
43+
(default version on Ubuntu 20.04).
4244
- use
4345

4446
```bash

buildbot/configure.py

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def do_configure(args):
3030
libclc_gen_remangled_variants = 'OFF'
3131
sycl_build_pi_cuda = 'OFF'
3232
sycl_build_pi_esimd_cpu = 'OFF'
33-
sycl_build_pi_rocm = 'OFF'
34-
sycl_build_pi_rocm_platform = 'AMD'
33+
sycl_build_pi_hip = 'OFF'
34+
sycl_build_pi_hip_platform = 'AMD'
3535
sycl_werror = 'ON'
3636
llvm_enable_assertions = 'ON'
3737
llvm_enable_doxygen = 'OFF'
@@ -40,6 +40,12 @@ def do_configure(args):
4040
llvm_enable_lld = 'OFF'
4141

4242
sycl_enable_xpti_tracing = 'ON'
43+
xpti_enable_werror = 'ON'
44+
45+
if args.ci_defaults:
46+
print("#############################################")
47+
print("# Default CI configuration will be applied. #")
48+
print("#############################################")
4349

4450
# replace not append, so ARM ^ X86
4551
if args.arm:
@@ -48,7 +54,7 @@ def do_configure(args):
4854
if args.enable_esimd_cpu_emulation:
4955
sycl_build_pi_esimd_cpu = 'ON'
5056

51-
if args.cuda or args.rocm:
57+
if args.cuda or args.hip:
5258
llvm_enable_projects += ';libclc'
5359

5460
if args.cuda:
@@ -57,23 +63,24 @@ def do_configure(args):
5763
libclc_gen_remangled_variants = 'ON'
5864
sycl_build_pi_cuda = 'ON'
5965

60-
if args.rocm:
61-
if args.rocm_platform == 'AMD':
66+
if args.hip:
67+
if args.hip_platform == 'AMD':
6268
llvm_targets_to_build += ';AMDGPU'
6369
libclc_targets_to_build += ';amdgcn--;amdgcn--amdhsa'
6470

65-
# The ROCm plugin for AMD uses lld for linking
71+
# The HIP plugin for AMD uses lld for linking
6672
llvm_enable_projects += ';lld'
67-
elif args.rocm_platform == 'NVIDIA' and not args.cuda:
73+
elif args.hip_platform == 'NVIDIA' and not args.cuda:
6874
llvm_targets_to_build += ';NVPTX'
6975
libclc_targets_to_build += ';nvptx64--;nvptx64--nvidiacl'
7076
libclc_gen_remangled_variants = 'ON'
7177

72-
sycl_build_pi_rocm_platform = args.rocm_platform
73-
sycl_build_pi_rocm = 'ON'
78+
sycl_build_pi_hip_platform = args.hip_platform
79+
sycl_build_pi_hip = 'ON'
7480

7581
if args.no_werror:
7682
sycl_werror = 'OFF'
83+
xpti_enable_werror = 'OFF'
7784

7885
if args.no_assertions:
7986
llvm_enable_assertions = 'OFF'
@@ -107,8 +114,8 @@ def do_configure(args):
107114
"-DLIBCLC_TARGETS_TO_BUILD={}".format(libclc_targets_to_build),
108115
"-DLIBCLC_GENERATE_REMANGLED_VARIANTS={}".format(libclc_gen_remangled_variants),
109116
"-DSYCL_BUILD_PI_CUDA={}".format(sycl_build_pi_cuda),
110-
"-DSYCL_BUILD_PI_ROCM={}".format(sycl_build_pi_rocm),
111-
"-DSYCL_BUILD_PI_ROCM_PLATFORM={}".format(sycl_build_pi_rocm_platform),
117+
"-DSYCL_BUILD_PI_HIP={}".format(sycl_build_pi_hip),
118+
"-DSYCL_BUILD_PI_HIP_PLATFORM={}".format(sycl_build_pi_hip_platform),
112119
"-DLLVM_BUILD_TOOLS=ON",
113120
"-DSYCL_ENABLE_WERROR={}".format(sycl_werror),
114121
"-DCMAKE_INSTALL_PREFIX={}".format(install_dir),
@@ -118,7 +125,8 @@ def do_configure(args):
118125
"-DBUILD_SHARED_LIBS={}".format(llvm_build_shared_libs),
119126
"-DSYCL_ENABLE_XPTI_TRACING={}".format(sycl_enable_xpti_tracing),
120127
"-DLLVM_ENABLE_LLD={}".format(llvm_enable_lld),
121-
"-DSYCL_BUILD_PI_ESIMD_CPU={}".format(sycl_build_pi_esimd_cpu)
128+
"-DSYCL_BUILD_PI_ESIMD_CPU={}".format(sycl_build_pi_esimd_cpu),
129+
"-DXPTI_ENABLE_WERROR={}".format(xpti_enable_werror)
122130
]
123131

124132
if args.l0_headers and args.l0_loader:
@@ -178,8 +186,8 @@ def main():
178186
parser.add_argument("-t", "--build-type",
179187
metavar="BUILD_TYPE", default="Release", help="build type: Debug, Release")
180188
parser.add_argument("--cuda", action='store_true', help="switch from OpenCL to CUDA")
181-
parser.add_argument("--rocm", action='store_true', help="switch from OpenCL to ROCm")
182-
parser.add_argument("--rocm-platform", type=str, choices=['AMD', 'NVIDIA'], default='AMD', help="choose ROCm backend")
189+
parser.add_argument("--hip", action='store_true', help="switch from OpenCL to HIP")
190+
parser.add_argument("--hip-platform", type=str, choices=['AMD', 'NVIDIA'], default='AMD', help="choose hardware platform for HIP backend")
183191
parser.add_argument("--arm", action='store_true', help="build ARM support rather than x86")
184192
parser.add_argument("--enable-esimd-cpu-emulation", action='store_true', help="build with ESIMD_CPU emulation support")
185193
parser.add_argument("--no-assertions", action='store_true', help="build without assertions")
@@ -193,6 +201,7 @@ def main():
193201
parser.add_argument("--libcxx-library", metavar="LIBCXX_LIBRARY_PATH", help="libcxx library path")
194202
parser.add_argument("--use-lld", action="store_true", help="Use LLD linker for build")
195203
parser.add_argument("--llvm-external-projects", help="Add external projects to build. Add as comma seperated list.")
204+
parser.add_argument("--ci-defaults", action="store_true", help="Enable default CI parameters")
196205
args = parser.parse_args()
197206

198207
print("args:{}".format(args))

buildbot/dependency.conf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ ocl_cpu_rt_ver=2021.12.6.0.19
44
# https://github.com/intel/llvm/releases/download/2021-WW26/win-oclcpuexp-2021.12.6.0.19_rel.zip
55
ocl_cpu_rt_ver_win=2021.12.6.0.19
66
# Same GPU driver supports Level Zero and OpenCL
7-
# https://github.com/intel/compute-runtime/releases/tag/21.33.20678
8-
ocl_gpu_rt_ver=21.33.20678
7+
# https://github.com/intel/compute-runtime/releases/tag/21.37.20939
8+
ocl_gpu_rt_ver=21.37.20939
99
# Same GPU driver supports Level Zero and OpenCL
10-
# https://downloadmirror.intel.com/646152/igfx_win_100.9805.zip
11-
ocl_gpu_rt_ver_win=30.0.100.9805
10+
# https://downloadmirror.intel.com/648245/igfx_win_100.9864.zip
11+
ocl_gpu_rt_ver_win=30.0.100.9864
1212
intel_sycl_ver=build
1313

1414
# TBB binaries can be built from sources following instructions under
@@ -30,8 +30,8 @@ ocloc_ver_win=27.20.100.9168
3030
[DRIVER VERSIONS]
3131
cpu_driver_lin=2021.12.6.0.19
3232
cpu_driver_win=2021.12.6.0.19
33-
gpu_driver_lin=21.33.20678
34-
gpu_driver_win=30.0.100.9805
33+
gpu_driver_lin=21.37.20939
34+
gpu_driver_win=30.0.100.9864
3535
fpga_driver_lin=2021.12.6.0.19
3636
fpga_driver_win=2021.12.6.0.19
3737
# NVidia CUDA driver

clang-tools-extra/clang-include-fixer/IncludeFixer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ clang::TypoCorrection IncludeFixerSemaSource::CorrectTypo(
245245
// parent_path.
246246
// FIXME: Don't rely on source text.
247247
const char *End = Source.end();
248-
while (isIdentifierBody(*End) || *End == ':')
248+
while (isAsciiIdentifierContinue(*End) || *End == ':')
249249
++End;
250250

251251
return std::string(Source.begin(), End);

clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,11 @@ AST_POLYMORPHIC_MATCHER(
4747
if (PrefixPosition == StringRef::npos)
4848
return false;
4949
Path = Path.drop_front(PrefixPosition + AbslPrefix.size());
50-
static const char *AbseilLibraries[] = {"algorithm", "base",
51-
"container", "debugging",
52-
"flags", "hash",
53-
"iterator", "memory",
54-
"meta", "numeric",
55-
"random", "status",
56-
"strings", "synchronization",
57-
"time", "types",
58-
"utility"};
50+
static const char *AbseilLibraries[] = {
51+
"algorithm", "base", "container", "debugging", "flags",
52+
"hash", "iterator", "memory", "meta", "numeric",
53+
"profiling", "random", "status", "strings", "synchronization",
54+
"time", "types", "utility"};
5955
return llvm::any_of(AbseilLibraries, [&](const char *Library) {
6056
return Path.startswith(Library);
6157
});

clang-tools-extra/clang-tidy/add_new_check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#===-----------------------------------------------------------------------===#
1010

1111
from __future__ import print_function
12+
from __future__ import unicode_literals
1213

1314
import argparse
1415
import io

clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ static bool isVarThatIsPossiblyChanged(const Decl *Func, const Stmt *LoopStmt,
6565
ObjCIvarRefExpr, ObjCPropertyRefExpr, ObjCMessageExpr>(Cond)) {
6666
// FIXME: Handle MemberExpr.
6767
return true;
68+
} else if (const auto *CE = dyn_cast<CastExpr>(Cond)) {
69+
QualType T = CE->getType();
70+
while (true) {
71+
if (T.isVolatileQualified())
72+
return true;
73+
74+
if (!T->isAnyPointerType() && !T->isReferenceType())
75+
break;
76+
77+
T = T->getPointeeType();
78+
}
6879
}
6980

7081
return false;

clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ add_clang_library(clangTidyCppCoreGuidelinesModule
2626
ProTypeVarargCheck.cpp
2727
SlicingCheck.cpp
2828
SpecialMemberFunctionsCheck.cpp
29+
VirtualClassDestructorCheck.cpp
2930

3031
LINK_LIBS
3132
clangTidy

clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "ProTypeVarargCheck.h"
3636
#include "SlicingCheck.h"
3737
#include "SpecialMemberFunctionsCheck.h"
38+
#include "VirtualClassDestructorCheck.h"
3839

3940
namespace clang {
4041
namespace tidy {
@@ -94,6 +95,8 @@ class CppCoreGuidelinesModule : public ClangTidyModule {
9495
CheckFactories.registerCheck<SlicingCheck>("cppcoreguidelines-slicing");
9596
CheckFactories.registerCheck<misc::UnconventionalAssignOperatorCheck>(
9697
"cppcoreguidelines-c-copy-assignment-signature");
98+
CheckFactories.registerCheck<VirtualClassDestructorCheck>(
99+
"cppcoreguidelines-virtual-class-destructor");
97100
}
98101

99102
ClangTidyOptions getModuleOptions() override {

clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static bool isSafeAssignment(const FieldDecl *Field, const Expr *Init,
8383
.empty();
8484
}
8585

86-
static const std::pair<const FieldDecl *, const Expr *>
86+
static std::pair<const FieldDecl *, const Expr *>
8787
isAssignmentToMemberOf(const CXXRecordDecl *Rec, const Stmt *S,
8888
const CXXConstructorDecl *Ctor) {
8989
if (const auto *BO = dyn_cast<BinaryOperator>(S)) {

0 commit comments

Comments
 (0)