Skip to content

Commit 0d6b772

Browse files
committed
PR feedback 2.
1 parent 80cc279 commit 0d6b772

File tree

5 files changed

+34
-7
lines changed

5 files changed

+34
-7
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12003,7 +12003,7 @@ def err_sycl_special_type_num_init_method : Error<
1200312003
"types with 'sycl_special_class' attribute must have one and only one '__init' "
1200412004
"method defined">;
1200512005
def warn_launch_bounds_is_cuda_specific : Warning<
12006-
"%0 attribute ignored, only applicable when targetting Nvidia devices">,
12006+
"%0 attribute ignored, only applicable when targeting Nvidia devices">,
1200712007
InGroup<IgnoredAttributes>;
1200812008

1200912009
def warn_cuda_maxclusterrank_sm_90 : Warning<

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "clang/AST/Mangle.h"
2323
#include "clang/AST/RecursiveASTVisitor.h"
2424
#include "clang/AST/Type.h"
25-
#include "clang/Basic/AttributeCommonInfo.h"
2625
#include "clang/Basic/CharInfo.h"
2726
#include "clang/Basic/Cuda.h"
2827
#include "clang/Basic/DarwinSDKInfo.h"

clang/test/CodeGenSYCL/lb_sm_90.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// RUN: %clang_cc1 -internal-isystem %S/Inputs -triple nvptx-unknown-unknown -target-cpu sm_90 -fsycl-is-device -Wno-c++23-extensions -S -emit-llvm %s -o - | FileCheck %s --check-prefix CHECK-IR
2-
// RUN: %clang_cc1 -internal-isystem %S/Inputs %s -triple nvptx64-nvidia-cuda -target-cpu sm_90 -fsycl-is-device -fsyntax-only -Wno-c++23-extensions -verify
3-
// expected-no-diagnostics
42

53
// Maximum work groups per multi-processor, mapped to maxclusterrank PTX
6-
// directive, is an SM_90 feature, make sure that correct metadata is generated
7-
// and no warnings/errors are issued.
4+
// directive, is an SM_90 feature, make sure that correct metadata is generated.
85

96
#include "sycl.hpp"
107

clang/test/SemaSYCL/lb_sm_70.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -internal-isystem %S/Inputs -triple nvptx-unknown-unknown -target-cpu sm_70 -fsycl-is-device -Wno-c++23-extensions -S -emit-llvm %s -o -ferror-limit=100 -fsyntax-only -verify %s
1+
// RUN: %clang_cc1 -internal-isystem %S/Inputs -triple nvptx-unknown-unknown -target-cpu sm_70 -fsycl-is-device -Wno-c++23-extensions -S -emit-llvm %s -o -fsyntax-only -verify %s
22

33
// Maximum work groups per multi-processor, mapped to maxclusterrank PTX
44
// directive, is an SM_90 feature, make sure that correct warning is issued on

clang/test/SemaSYCL/lb_sm_90.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// RUN: %clang_cc1 -internal-isystem %S/Inputs %s -triple nvptx64-nvidia-cuda -target-cpu sm_90 -fsycl-is-device -fsyntax-only -Wno-c++23-extensions -verify
2+
// expected-no-diagnostics
3+
4+
// Maximum work groups per multi-processor, mapped to maxclusterrank PTX
5+
// directive, is an SM_90 feature, make sure that no warnings/errors are issued.
6+
7+
#include "sycl.hpp"
8+
9+
template <int N1, int N2, int N3> class Functor {
10+
public:
11+
[[intel::max_work_group_size(1, 1, N1), intel::min_work_groups_per_cu(N2),
12+
intel::max_work_groups_per_mp(N3)]] void
13+
operator()() const {}
14+
};
15+
16+
int main() {
17+
sycl::queue Q{};
18+
19+
Q.submit([&](sycl::handler &cgh) {
20+
cgh.single_task<class T1>( [=] [[intel::max_work_group_size(1, 1, 256),
21+
intel::min_work_groups_per_cu(2),
22+
intel::max_work_groups_per_mp(4)]] (
23+
) { volatile int A = 42; });
24+
});
25+
26+
Q.submit([&](sycl::handler &cgh) {
27+
cgh.single_task<class F>(Functor<512, 8, 16>{});
28+
});
29+
30+
return 0;
31+
}

0 commit comments

Comments
 (0)