This repository was archived by the owner on Mar 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
SYCL/OptionalKernelFeatures Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 13
13
class KernelCPU ;
14
14
class KernelGPU ;
15
15
class KernelACC ;
16
+ class GoodWGSize ;
17
+ class WrongReqWGSize ;
18
+
19
+ constexpr int SIZE = 2 ;
16
20
17
21
int main () {
18
22
bool Compatible = true ;
@@ -42,5 +46,29 @@ int main() {
42
46
Called = true ;
43
47
}
44
48
49
+ if (sycl::is_compatible<GoodWGSize>(Dev)) {
50
+ Q.submit ([&](sycl::handler &h) {
51
+ h.parallel_for <class GoodWGSize >(
52
+ sycl::range<2 >(4 , 2 ),
53
+ [=](sycl::item<2 > it) [[sycl::reqd_work_group_size (SIZE, SIZE)]] {});
54
+ });
55
+ Q.wait ();
56
+ Compatible &= (Dev.get_info <sycl::info::device::max_work_group_size>() >
57
+ (SIZE * SIZE));
58
+ Called = true ;
59
+ }
60
+
61
+ if (Dev.get_info <sycl::info::device::max_work_group_size>() > INT_MAX) {
62
+ Compatible &= true ;
63
+ }
64
+ if (sycl::is_compatible<WrongReqWGSize>(Dev)) {
65
+ assert (false && " sycl::is_compatible<WrongReqWGSize> must be false" );
66
+ Q.submit ([&](sycl::handler &h) {
67
+ h.parallel_for <class WrongReqWGSize >(
68
+ sycl::range<1 >(2 ),
69
+ [=](sycl::item<1 > it) [[sycl::reqd_work_group_size (INT_MAX)]] {});
70
+ });
71
+ }
72
+
45
73
return (Compatible && Called) ? 0 : 1 ;
46
74
}
You can’t perform that action at this time.
0 commit comments