|
1 | | -// Fails with opencl non-cpu and level_zero on linux, enable when fixed. |
2 | | -// XFAIL: (opencl && !cpu) || (linux && level_zero) |
| 1 | +// Fails with opencl non-cpu, enable when fixed. |
| 2 | +// XFAIL: (opencl && !cpu) |
3 | 3 | // RUN: %{build} -I . -o %t.out |
4 | 4 | // RUN: %{run} %t.out |
5 | 5 |
|
@@ -48,20 +48,19 @@ void testRootGroup() { |
48 | 48 | const auto range = sycl::nd_range<1>{maxWGs * WorkGroupSize, WorkGroupSize}; |
49 | 49 | q.submit([&](sycl::handler &h) { |
50 | 50 | sycl::accessor data{dataBuf, h}; |
51 | | - h.parallel_for<class RootGroupKernel>( |
52 | | - range, props, [=](sycl::nd_item<1> it) { |
53 | | - auto root = it.ext_oneapi_get_root_group(); |
54 | | - data[root.get_local_id()] = root.get_local_id(); |
55 | | - sycl::group_barrier(root); |
| 51 | + h.parallel_for< |
| 52 | + class RootGroupKernel>(range, props, [=](sycl::nd_item<1> it) { |
| 53 | + auto root = it.ext_oneapi_get_root_group(); |
| 54 | + data[root.get_local_id()] = root.get_local_id(); |
| 55 | + sycl::group_barrier(root); |
56 | 56 |
|
57 | | - root = |
58 | | - sycl::ext::oneapi::experimental::this_work_item::get_root_group< |
59 | | - 1>(); |
60 | | - int sum = data[root.get_local_id()] + |
61 | | - data[root.get_local_range() - root.get_local_id() - 1]; |
62 | | - sycl::group_barrier(root); |
63 | | - data[root.get_local_id()] = sum; |
64 | | - }); |
| 57 | + root = |
| 58 | + sycl::ext::oneapi::experimental::this_work_item::get_root_group<1>(); |
| 59 | + int sum = data[root.get_local_id()] + |
| 60 | + data[root.get_local_range() - root.get_local_id() - 1]; |
| 61 | + sycl::group_barrier(root); |
| 62 | + data[root.get_local_id()] = sum; |
| 63 | + }); |
65 | 64 | }); |
66 | 65 | sycl::host_accessor data{dataBuf}; |
67 | 66 | const int workItemCount = static_cast<int>(range.get_global_range().size()); |
@@ -95,15 +94,15 @@ void testRootGroupFunctions() { |
95 | 94 | ? root.get_local_id() == sycl::id<1>(0) |
96 | 95 | : root.get_local_id() == sycl::id<1>(3); |
97 | 96 | testResults[2] = root.get_group_range() == sycl::range<1>(1); |
98 | | - testResults[3] = |
99 | | - root.get_local_range() == sycl::range<1>(WorkGroupSize); |
| 97 | + testResults[3] = root.get_local_range() == it.get_global_range(); |
100 | 98 | testResults[4] = |
101 | | - root.get_max_local_range() == sycl::range<1>(WorkGroupSize); |
| 99 | + root.get_max_local_range() == root.get_local_range(); |
102 | 100 | testResults[5] = root.get_group_linear_id() == 0; |
103 | 101 | testResults[6] = |
104 | 102 | root.get_local_linear_id() == root.get_local_id().get(0); |
105 | 103 | testResults[7] = root.get_group_linear_range() == 1; |
106 | | - testResults[8] = root.get_local_linear_range() == WorkGroupSize; |
| 104 | + testResults[8] = |
| 105 | + root.get_local_linear_range() == root.get_local_range().size(); |
107 | 106 | } |
108 | 107 | }); |
109 | 108 | }); |
|
0 commit comments