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

Commit ad85d03

Browse files
author
Alexander Batashev
committed
[SYCL] Update free function queries tests
1 parent 7e07c5a commit ad85d03

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

SYCL/Basic/free_function_queries/free_function_queries.cpp

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out
55
// RUN: %GPU_RUN_PLACEHOLDER %t.out
66

7-
// TODO: Support global work offset on Level Zero.
8-
// UNSUPPORTED: level_zero
9-
107
//==- free_function_queries.cpp - SYCL free function queries test -=//
118
//
129
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -42,10 +39,10 @@ int main() {
4239
sycl::access::target::global_buffer>
4340
results_acc(results_buf.get_access<sycl::access::mode::write>(cgh));
4441
cgh.parallel_for<class IdTest>(n, [=](sycl::id<1> i) {
45-
auto that_id = sycl::this_id<1>();
42+
auto that_id = sycl::experimental::this_id<1>();
4643
results_acc[0] = that_id == i;
4744

48-
auto that_item = sycl::this_item<1>();
45+
auto that_item = sycl::experimental::this_item<1>();
4946
results_acc[1] = that_item.get_id() == i;
5047
results_acc[2] = that_item.get_range() == sycl::range<1>(n);
5148
acc[i]++;
@@ -78,9 +75,9 @@ int main() {
7875
cgh.parallel_for<class ItemTest>(n, [=](auto i) {
7976
static_assert(std::is_same<decltype(i), sycl::item<1>>::value,
8077
"lambda arg type is unexpected");
81-
auto that_id = sycl::this_id<1>();
78+
auto that_id = sycl::experimental::this_id<1>();
8279
results_acc[0] = i.get_id() == that_id;
83-
auto that_item = sycl::this_item<1>();
80+
auto that_item = sycl::experimental::this_item<1>();
8481
results_acc[1] = i == that_item;
8582
acc[i]++;
8683
});
@@ -112,9 +109,9 @@ int main() {
112109
results_acc(results_buf.get_access<sycl::access::mode::write>(cgh));
113110
cgh.parallel_for<class ItemOffsetTest>(
114111
sycl::range<1>{n}, offset, [=](sycl::item<1, true> i) {
115-
auto that_id = sycl::this_id<1>();
112+
auto that_id = sycl::experimental::this_id<1>();
116113
results_acc[0] = i.get_id() == that_id;
117-
auto that_item = sycl::this_item<1>();
114+
auto that_item = sycl::experimental::this_item<1>();
118115
results_acc[1] = i == that_item;
119116
acc[that_item.get_linear_id()]++;
120117
});
@@ -147,13 +144,13 @@ int main() {
147144
cgh.parallel_for<class NdItemTest>(NDR, [=](auto nd_i) {
148145
static_assert(std::is_same<decltype(nd_i), sycl::nd_item<1>>::value,
149146
"lambda arg type is unexpected");
150-
auto that_nd_item = sycl::this_nd_item<1>();
147+
auto that_nd_item = sycl::experimental::this_nd_item<1>();
151148
results_acc[0] = that_nd_item == nd_i;
152149
auto nd_item_group = that_nd_item.get_group();
153-
results_acc[1] = nd_item_group == sycl::this_group<1>();
150+
results_acc[1] = nd_item_group == sycl::experimental::this_group<1>();
154151
auto nd_item_id = that_nd_item.get_global_id();
155-
results_acc[2] = nd_item_id == sycl::this_id<1>();
156-
auto that_item = sycl::this_item<1>();
152+
results_acc[2] = nd_item_id == sycl::experimental::this_id<1>();
153+
auto that_item = sycl::experimental::this_item<1>();
157154
results_acc[3] = nd_item_id == that_item.get_id();
158155
results_acc[4] =
159156
that_nd_item.get_global_range() == that_item.get_range();

SYCL/Basic/free_function_queries/free_function_queries_sub_group.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ int main() {
4949
cgh.parallel_for<class NdItemTest>(NDR, [=](auto nd_i) {
5050
static_assert(std::is_same<decltype(nd_i), sycl::nd_item<1>>::value,
5151
"lambda arg type is unexpected");
52-
auto that_nd_item = sycl::this_nd_item<1>();
52+
auto that_nd_item = sycl::experimental::this_nd_item<1>();
5353
results_acc[0] = that_nd_item == nd_i;
5454

55-
auto that_sub_group = sycl::ONEAPI::this_sub_group();
55+
auto that_sub_group = sycl::experimental::this_sub_group();
5656
results_acc[1] = that_sub_group.get_local_linear_id() ==
5757
that_nd_item.get_sub_group().get_local_linear_id();
5858
results_acc[2] = that_sub_group.get_local_id() ==

0 commit comments

Comments
 (0)