Skip to content

Commit 2b9d175

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web'
2 parents 2d6353e + f0cadb1 commit 2b9d175

File tree

301 files changed

+819
-162
lines changed

Some content is hidden

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

301 files changed

+819
-162
lines changed

buildbot/dependency.conf

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
[VERSIONS]
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
2+
# https://github.com/intel/llvm/releases/download/2020-WW45/oclcpuexp-2020.11.11.0.04_rel.tar.gz
3+
ocl_cpu_rt_ver=2020.11.11.0.04
4+
# https://github.com/intel/llvm/releases/download/2020-WW45/win-oclcpuexp-2020.11.11.0.04_rel.zip
5+
ocl_cpu_rt_ver_win=2020.11.11.0.04
66
# Same GPU driver supports Level Zero and OpenCL:
7-
# https://github.com/intel/compute-runtime/releases/tag/20.42.18209
8-
ocl_gpu_rt_ver=20.42.18209
7+
# https://github.com/intel/compute-runtime/releases/tag/20.44.18297
8+
ocl_gpu_rt_ver=20.44.18297
99
# Same GPU driver supports Level Zero and OpenCL:
1010
# https://downloadmirror.intel.com/29879/a08/igfx_win10_100.8778.zip
1111
ocl_gpu_rt_ver_win=27.20.100.8778
1212
intel_sycl_ver=build
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
13+
# https://github.com/oneapi-src/oneTBB/releases/download/v2021.1-beta10/oneapi-tbb-2021.1-beta10-lin.tgz
14+
tbb_ver=2021.1.053
15+
# https://github.com/oneapi-src/oneTBB/releases/download/v2021.1-beta10/oneapi-tbb-2021.1-beta10-win.zip
16+
tbb_ver_win=2021.1.049
17+
# https://github.com/intel/llvm/releases/download/2020-WW45/fpgaemu-2020.11.11.0.04_rel.tar.gz
18+
ocl_fpga_emu_ver=2020.11.11.0.04
19+
# https://github.com/intel/llvm/releases/download/2020-WW45/win-fpgaemu-2020.11.11.0.04_rel.zip
20+
ocl_fpga_emu_ver_win=2020.11.11.0.04
21+
fpga_ver=20201021_000005
22+
fpga_ver_win=20201022_000005
2323

2424
[DRIVER VERSIONS]
25-
cpu_driver_lin=2020.11.10.0.05
26-
cpu_driver_win=2020.11.10.0.05
27-
gpu_driver_lin=20.42.18209
25+
cpu_driver_lin=2020.11.11.0.04
26+
cpu_driver_win=2020.11.11.0.04
27+
gpu_driver_lin=20.44.18297
2828
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
29+
fpga_driver_lin=2020.11.11.0.04
30+
fpga_driver_win=2020.11.11.0.04
3131
# NVidia CUDA driver
3232
# TODO provide URL for CUDA driver
3333
nvidia_gpu_driver_lin=435.21

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11085,12 +11085,14 @@ def err_ext_int_max_size : Error<"%select{signed|unsigned}0 _ExtInt of bit "
1108511085
def err_esimd_glob_cant_init : Error<
1108611086
"SYCL explicit SIMD does not permit private global variable to have an initializer">;
1108711087

11088-
def err_sycl_kernel_incorrectly_named : Error<
11089-
"kernel %select{name is missing"
11090-
"|needs to have a globally-visible name"
11091-
"|name is invalid. Unscoped enum requires fixed underlying type"
11092-
"|name cannot be a type in the \"std\" namespace"
11088+
def err_sycl_kernel_incorrectly_named : Error<"%0 is an invalid kernel name type">;
11089+
def note_invalid_type_in_sycl_kernel : Note<
11090+
"%select{%1 should be globally-visible"
11091+
"|unscoped enum %1 requires fixed underlying type"
11092+
"|type %1 cannot be in the \"std\" namespace"
11093+
"|kernel name is missing"
1109311094
"}0">;
11095+
1109411096
def err_sycl_kernel_not_function_object
1109511097
: Error<"kernel parameter must be a lambda or function object">;
1109611098
def err_sycl_restrict : Error<

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4906,7 +4906,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
49064906
}
49074907

49084908
if (Arg *A = Args.getLastArg(options::OPT_LongDouble_Group)) {
4909-
if (TC.getTriple().isX86())
4909+
if (TC.getTriple().isX86() || TC.getTriple().isSPIR())
49104910
A->render(Args, CmdArgs);
49114911
else if ((TC.getArch() == llvm::Triple::ppc || TC.getTriple().isPPC64()) &&
49124912
(A->getOption().getID() != options::OPT_mlong_double_80))

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,6 +2833,7 @@ class SYCLKernelNameTypeVisitor
28332833
public ConstTemplateArgumentVisitor<SYCLKernelNameTypeVisitor> {
28342834
Sema &S;
28352835
SourceLocation KernelInvocationFuncLoc;
2836+
QualType KernelNameType;
28362837
using InnerTypeVisitor = TypeVisitor<SYCLKernelNameTypeVisitor>;
28372838
using InnerTemplArgVisitor =
28382839
ConstTemplateArgumentVisitor<SYCLKernelNameTypeVisitor>;
@@ -2844,8 +2845,10 @@ class SYCLKernelNameTypeVisitor
28442845
}
28452846

28462847
public:
2847-
SYCLKernelNameTypeVisitor(Sema &S, SourceLocation KernelInvocationFuncLoc)
2848-
: S(S), KernelInvocationFuncLoc(KernelInvocationFuncLoc) {}
2848+
SYCLKernelNameTypeVisitor(Sema &S, SourceLocation KernelInvocationFuncLoc,
2849+
QualType KernelNameType)
2850+
: S(S), KernelInvocationFuncLoc(KernelInvocationFuncLoc),
2851+
KernelNameType(KernelNameType) {}
28492852

28502853
bool isValid() { return !IsInvalid; }
28512854

@@ -2856,7 +2859,9 @@ class SYCLKernelNameTypeVisitor
28562859
if (!RD) {
28572860
if (T->isNullPtrType()) {
28582861
S.Diag(KernelInvocationFuncLoc, diag::err_sycl_kernel_incorrectly_named)
2859-
<< /* kernel name cannot be a type in the std namespace */ 3;
2862+
<< KernelNameType;
2863+
S.Diag(KernelInvocationFuncLoc, diag::note_invalid_type_in_sycl_kernel)
2864+
<< /* kernel name cannot be a type in the std namespace */ 2 << T;
28602865
IsInvalid = true;
28612866
}
28622867
return;
@@ -2881,9 +2886,10 @@ class SYCLKernelNameTypeVisitor
28812886
const EnumDecl *ED = T->getDecl();
28822887
if (!ED->isScoped() && !ED->isFixed()) {
28832888
S.Diag(KernelInvocationFuncLoc, diag::err_sycl_kernel_incorrectly_named)
2884-
<< /* Unscoped enum requires fixed underlying type */ 2;
2885-
S.Diag(ED->getSourceRange().getBegin(), diag::note_entity_declared_at)
2886-
<< ED;
2889+
<< KernelNameType;
2890+
S.Diag(KernelInvocationFuncLoc, diag::note_invalid_type_in_sycl_kernel)
2891+
<< /* Unscoped enum requires fixed underlying type */ 1
2892+
<< QualType(ED->getTypeForDecl(), 0);
28872893
IsInvalid = true;
28882894
}
28892895
}
@@ -2900,7 +2906,10 @@ class SYCLKernelNameTypeVisitor
29002906
auto *NameSpace = dyn_cast_or_null<NamespaceDecl>(DeclCtx);
29012907
if (NameSpace && NameSpace->isStdNamespace()) {
29022908
S.Diag(KernelInvocationFuncLoc, diag::err_sycl_kernel_incorrectly_named)
2903-
<< /* kernel name cannot be a type in the std namespace */ 3;
2909+
<< KernelNameType;
2910+
S.Diag(KernelInvocationFuncLoc, diag::note_invalid_type_in_sycl_kernel)
2911+
<< /* kernel name cannot be a type in the std namespace */ 2
2912+
<< QualType(Tag->getTypeForDecl(), 0);
29042913
IsInvalid = true;
29052914
return;
29062915
}
@@ -2909,19 +2918,27 @@ class SYCLKernelNameTypeVisitor
29092918
if (KernelNameIsMissing) {
29102919
S.Diag(KernelInvocationFuncLoc,
29112920
diag::err_sycl_kernel_incorrectly_named)
2912-
<< /* kernel name is missing */ 0;
2921+
<< KernelNameType;
2922+
S.Diag(KernelInvocationFuncLoc,
2923+
diag::note_invalid_type_in_sycl_kernel)
2924+
<< /* kernel name is missing */ 3;
29132925
IsInvalid = true;
29142926
return;
29152927
}
29162928
if (Tag->isCompleteDefinition()) {
29172929
S.Diag(KernelInvocationFuncLoc,
29182930
diag::err_sycl_kernel_incorrectly_named)
2919-
<< /* kernel name is not globally-visible */ 1;
2931+
<< KernelNameType;
2932+
S.Diag(KernelInvocationFuncLoc,
2933+
diag::note_invalid_type_in_sycl_kernel)
2934+
<< /* kernel name is not globally-visible */ 0
2935+
<< QualType(Tag->getTypeForDecl(), 0);
29202936
IsInvalid = true;
2921-
} else
2937+
} else {
29222938
S.Diag(KernelInvocationFuncLoc, diag::warn_sycl_implicit_decl);
2923-
S.Diag(Tag->getSourceRange().getBegin(), diag::note_previous_decl)
2924-
<< Tag->getName();
2939+
S.Diag(Tag->getSourceRange().getBegin(), diag::note_previous_decl)
2940+
<< Tag->getName();
2941+
}
29252942
}
29262943
}
29272944
}
@@ -2998,7 +3015,8 @@ void Sema::CheckSYCLKernelCall(FunctionDecl *KernelFunc, SourceRange CallLoc,
29983015
SyclKernelArgsSizeChecker ArgsSizeChecker(*this, Args[0]->getExprLoc());
29993016

30003017
KernelObjVisitor Visitor{*this};
3001-
SYCLKernelNameTypeVisitor KernelNameTypeVisitor(*this, Args[0]->getExprLoc());
3018+
SYCLKernelNameTypeVisitor KernelNameTypeVisitor(*this, Args[0]->getExprLoc(),
3019+
KernelNameType);
30023020

30033021
DiagnosingSYCLKernel = true;
30043022

clang/test/Driver/mlong-double-128.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: %clang -target powerpc64-pc-freebsd12 -c -### %s -mlong-double-128 2>&1 | FileCheck %s
33
// RUN: %clang -target powerpc64le-linux-musl -c -### %s -mlong-double-128 2>&1 | FileCheck %s
44
// RUN: %clang -target i686-linux-gnu -c -### %s -mlong-double-128 2>&1 | FileCheck %s
5+
// RUN: %clang -target spir64-unknown-unknown-sycldevice -c -### %s -mlong-double-128 2>&1 | FileCheck %s
56

67
// RUN: %clang -target x86_64-linux-musl -c -### %s -mlong-double-128 -mlong-double-80 2>&1 | FileCheck --implicit-check-not=-mlong-double-128 /dev/null
78
// RUN: %clang -target x86_64-linux-musl -c -### %s -mlong-double-80 -mlong-double-128 2>&1 | FileCheck %s

clang/test/Driver/mlong-double-64.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// RUN: %clang -target powerpc64le-linux-musl -c -### %s -mlong-double-64 2>&1 | FileCheck %s
44
// RUN: %clang -target i686-linux-gnu -c -### %s -mlong-double-64 2>&1 | FileCheck %s
55
// RUN: %clang -target x86_64-linux-musl -c -### %s -mlong-double-64 2>&1 | FileCheck %s
6+
// RUN: %clang -target spir64-unknown-unknown-sycldevice -c -### %s -mlong-double-64 2>&1 | FileCheck %s
67

78
// CHECK: "-mlong-double-64"
89

clang/test/SemaSYCL/implicit_kernel_type.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ int main() {
2525
queue q;
2626

2727
#if defined(WARN)
28-
// expected-error@Inputs/sycl.hpp:220 {{kernel needs to have a globally-visible name}}
29-
// expected-note@+7 {{InvalidKernelName1 declared here}}
28+
// expected-error@Inputs/sycl.hpp:220 {{'InvalidKernelName1' is an invalid kernel name type}}
29+
// expected-note@Inputs/sycl.hpp:220 {{'InvalidKernelName1' should be globally-visible}}
3030
// expected-note@+8 {{in instantiation of function template specialization}}
3131
#elif defined(ERROR)
32-
// expected-error@Inputs/sycl.hpp:220 {{kernel needs to have a globally-visible name}}
33-
// expected-note@+3 {{InvalidKernelName1 declared here}}
32+
// expected-error@Inputs/sycl.hpp:220 {{'InvalidKernelName1' is an invalid kernel name type}}
33+
// expected-note@Inputs/sycl.hpp:220 {{'InvalidKernelName1' should be globally-visible}}
3434
// expected-note@+4 {{in instantiation of function template specialization}}
3535
#endif
3636
class InvalidKernelName1 {};

clang/test/SemaSYCL/kernelname-enum.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h -fsyntax-only -Wno-sycl-2017-compat -verify %s
22

3-
// expected-error@Inputs/sycl.hpp:220 2{{kernel name is invalid. Unscoped enum requires fixed underlying type}}
43
#include "Inputs/sycl.hpp"
54

65
enum unscoped_enum_int : int {
76
val_1,
87
val_2
98
};
109

11-
// expected-note@+1 2 {{'unscoped_enum_no_type_set' declared here}}
1210
enum unscoped_enum_no_type_set {
1311
val_3,
1412
val_4
@@ -69,11 +67,15 @@ int main() {
6967
});
7068

7169
q.submit([&](cl::sycl::handler &cgh) {
70+
// expected-error@Inputs/sycl.hpp:220 {{'dummy_functor_2<val_3>' is an invalid kernel name type}}
71+
// expected-note@Inputs/sycl.hpp:220 {{unscoped enum 'unscoped_enum_no_type_set' requires fixed underlying type}}
7272
// expected-note@+1{{in instantiation of function template specialization}}
7373
cgh.single_task(f2);
7474
});
7575

7676
q.submit([&](cl::sycl::handler &cgh) {
77+
// expected-error@Inputs/sycl.hpp:220 {{'templated_functor<dummy_functor_2>' is an invalid kernel name type}}
78+
// expected-note@Inputs/sycl.hpp:220 {{unscoped enum 'unscoped_enum_no_type_set' requires fixed underlying type}}
7779
// expected-note@+1{{in instantiation of function template specialization}}
7880
cgh.single_task(f5);
7981
});

clang/test/SemaSYCL/stdtypes_kernel_type.cpp

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,55 @@ typedef long int ptrdiff_t;
88
typedef decltype(nullptr) nullptr_t;
99
class T;
1010
class U;
11+
class Foo;
1112
} // namespace std
1213

1314
template <typename T>
1415
struct Templated_kernel_name;
1516

17+
template <typename T>
18+
struct Templated_kernel_name2;
19+
1620
template <typename T, typename... Args> class TemplParamPack;
1721

1822
using namespace cl::sycl;
1923
queue q;
2024

2125
int main() {
2226
#ifdef CHECK_ERROR
23-
// expected-error@Inputs/sycl.hpp:220 5 {{kernel name cannot be a type in the "std" namespace}}
2427
q.submit([&](handler &h) {
28+
// expected-error@Inputs/sycl.hpp:220 {{'nullptr_t' is an invalid kernel name type}}
29+
// expected-note@Inputs/sycl.hpp:220 {{type 'nullptr_t' cannot be in the "std" namespace}}
2530
// expected-note@+1{{in instantiation of function template specialization}}
2631
h.single_task<std::nullptr_t>([=] {});
2732
});
2833
q.submit([&](handler &h) {
34+
// expected-error@Inputs/sycl.hpp:220 {{'std::T' is an invalid kernel name type}}
35+
// expected-note@Inputs/sycl.hpp:220 {{type 'std::T' cannot be in the "std" namespace}}
2936
// expected-note@+1{{in instantiation of function template specialization}}
3037
h.single_task<std::T>([=] {});
3138
});
3239
q.submit([&](handler &h) {
40+
// expected-error@Inputs/sycl.hpp:220 {{'Templated_kernel_name<nullptr_t>' is an invalid kernel name type}}
41+
// expected-note@Inputs/sycl.hpp:220 {{type 'nullptr_t' cannot be in the "std" namespace}}
3342
// expected-note@+1{{in instantiation of function template specialization}}
3443
h.single_task<Templated_kernel_name<std::nullptr_t>>([=] {});
3544
});
3645
q.submit([&](handler &h) {
46+
// expected-error@Inputs/sycl.hpp:220 {{'Templated_kernel_name<std::U>' is an invalid kernel name type}}
47+
// expected-note@Inputs/sycl.hpp:220 {{type 'std::U' cannot be in the "std" namespace}}
3748
// expected-note@+1{{in instantiation of function template specialization}}
3849
h.single_task<Templated_kernel_name<std::U>>([=] {});
3950
});
4051
q.submit([&](handler &cgh) {
52+
// expected-error@Inputs/sycl.hpp:220 {{'Templated_kernel_name2<Templated_kernel_name<std::Foo>>' is an invalid kernel name type}}
53+
// expected-note@Inputs/sycl.hpp:220{{type 'std::Foo' cannot be in the "std" namespace}}
54+
// expected-note@+1{{in instantiation of function template specialization}}
55+
cgh.single_task<Templated_kernel_name2<Templated_kernel_name<std::Foo>>>([]() {});
56+
});
57+
q.submit([&](handler &cgh) {
58+
// expected-error@Inputs/sycl.hpp:220 {{'TemplParamPack<int, float, nullptr_t, double>' is an invalid kernel name type}}
59+
// expected-note@Inputs/sycl.hpp:220 {{type 'nullptr_t' cannot be in the "std" namespace}}
4160
// expected-note@+1{{in instantiation of function template specialization}}
4261
cgh.single_task<TemplParamPack<int, float, std::nullptr_t, double>>([]() {});
4362
});

0 commit comments

Comments
 (0)