Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit d51fdab

Browse files
committed
Fix tests after enabling rounding-up optimizations when this_item call is used
1 parent e8de8bb commit d51fdab

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

SYCL/Basic/free_function_queries/free_function_queries.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// FIXME: Investigate OS-agnostic failures
2-
// REQUIRES: TEMPORARY_DISABLED
31
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
42
// RUN: %ACC_RUN_PLACEHOLDER %t.out
53
// RUN: %CPU_RUN_PLACEHOLDER %t.out
@@ -48,7 +46,8 @@ int main() {
4846

4947
auto that_item = sycl::ext::oneapi::experimental::this_item<1>();
5048
results_acc[1] = that_item.get_id() == i;
51-
results_acc[2] = that_item.get_range() == sycl::range<1>(n);
49+
results_acc[2] =
50+
that_item.get_range() == ((sycl::range<1>(n) + (31)) & ~(31));
5251
acc[i]++;
5352
});
5453
});
@@ -63,7 +62,7 @@ int main() {
6362
}
6463

6564
{
66-
constexpr int checks_number{2};
65+
constexpr int checks_number{3};
6766
int results[checks_number]{};
6867
{
6968
sycl::buffer<int> buf(data, sycl::range<1>(n));
@@ -82,7 +81,9 @@ int main() {
8281
auto that_id = sycl::ext::oneapi::experimental::this_id<1>();
8382
results_acc[0] = i.get_id() == that_id;
8483
auto that_item = sycl::ext::oneapi::experimental::this_item<1>();
85-
results_acc[1] = i == that_item;
84+
results_acc[1] = i == that_item.get_id();
85+
results_acc[2] =
86+
that_item.get_range() == ((sycl::range<1>(n) + (31)) & ~(31));
8687
acc[i]++;
8788
});
8889
});

0 commit comments

Comments
 (0)