File tree Expand file tree Collapse file tree 3 files changed +11
-19
lines changed Expand file tree Collapse file tree 3 files changed +11
-19
lines changed Original file line number Diff line number Diff line change @@ -11004,8 +11004,8 @@ def err_sycl_restrict : Error<
11004
11004
"nor constant-initialized"
11005
11005
"}0">;
11006
11006
def warn_sycl_kernel_too_big_args : Warning<
11007
- "size of kernel arguments (%0 bytes) exceeds supported maximum of %1 bytes "
11008
- "on GPU ">, InGroup<SyclStrict>;
11007
+ "size of kernel arguments (%0 bytes) may exceed the supported maximum "
11008
+ "of %1 bytes on some devices ">, InGroup<SyclStrict>;
11009
11009
def err_sycl_virtual_types : Error<
11010
11010
"No class with a vtable can be used in a SYCL kernel or any code included in the kernel">;
11011
11011
def note_sycl_recursive_function_declared_here: Note<"function implemented using recursion declared here">;
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ enum KernelInvocationKind {
58
58
59
59
const static std::string InitMethodName = " __init" ;
60
60
const static std::string FinalizeMethodName = " __finalize" ;
61
- constexpr unsigned GPUMaxKernelArgsSize = 2048 ;
61
+ constexpr unsigned MaxKernelArgsSize = 2048 ;
62
62
63
63
namespace {
64
64
@@ -1697,11 +1697,9 @@ class SyclKernelArgsSizeChecker : public SyclKernelFieldHandler {
1697
1697
: SyclKernelFieldHandler(S), KernelLoc(Loc) {}
1698
1698
1699
1699
~SyclKernelArgsSizeChecker () {
1700
- if (SemaRef.Context .getTargetInfo ().getTriple ().getSubArch () ==
1701
- llvm::Triple::SPIRSubArch_gen)
1702
- if (SizeOfParams > GPUMaxKernelArgsSize)
1703
- SemaRef.Diag (KernelLoc, diag::warn_sycl_kernel_too_big_args)
1704
- << SizeOfParams << GPUMaxKernelArgsSize;
1700
+ if (SizeOfParams > MaxKernelArgsSize)
1701
+ SemaRef.Diag (KernelLoc, diag::warn_sycl_kernel_too_big_args)
1702
+ << SizeOfParams << MaxKernelArgsSize;
1705
1703
}
1706
1704
1707
1705
bool handleSyclAccessorType (FieldDecl *FD, QualType FieldTy) final {
Original file line number Diff line number Diff line change 1
- // RUN: %clang_cc1 -fsycl -triple spir64_gen -DGPU -fsycl-is-device -fsyntax-only -verify %s
2
1
// RUN: %clang_cc1 -fsycl -triple spir64 -fsycl-is-device -fsyntax-only -verify %s
3
- // RUN: %clang_cc1 -fsycl -triple spir64_gen -Wno-sycl-strict -fsycl-is-device -fsyntax-only -verify %s
4
- // RUN: %clang_cc1 -fsycl -triple spir64_gen -Werror=sycl-strict -DERROR -fsycl-is-device -fsyntax-only -verify %s
2
+ // RUN: %clang_cc1 -fsycl -triple spir64 -Werror=sycl-strict -DERROR -fsycl-is-device -fsyntax-only -verify %s
5
3
6
4
#include " Inputs/sycl.hpp"
7
5
class Foo ;
@@ -13,12 +11,10 @@ __attribute__((sycl_kernel)) void kernel(F KernelFunc) {
13
11
14
12
template <typename Name, typename F>
15
13
void parallel_for (F KernelFunc) {
16
- #ifdef GPU
17
- // expected-warning@+6 {{size of kernel arguments (7994 bytes) exceeds supported maximum of 2048 bytes on GPU}}
18
- #elif ERROR
19
- // expected-error@+4 {{size of kernel arguments (7994 bytes) exceeds supported maximum of 2048 bytes on GPU}}
14
+ #ifdef ERROR
15
+ // expected-error@+4 {{size of kernel arguments (7994 bytes) may exceed the supported maximum of 2048 bytes on some devices}}
20
16
#else
21
- // expected-no-diagnostics
17
+ // expected-warning@+2 {{size of kernel arguments (7994 bytes) may exceed the supported maximum of 2048 bytes on some devices}}
22
18
#endif
23
19
kernel<Name>(KernelFunc);
24
20
}
@@ -35,8 +31,6 @@ void use() {
35
31
int Array[1991 ];
36
32
} Args;
37
33
auto L = [=]() { (void )Args; };
38
- #if defined(GPU) || defined(ERROR)
39
- // expected-note@+2 {{in instantiation of function template specialization 'parallel_for<Foo}}
40
- #endif
34
+ // expected-note@+1 {{in instantiation of function template specialization 'parallel_for<Foo}}
41
35
parallel_for<Foo>(L);
42
36
}
You can’t perform that action at this time.
0 commit comments