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

[SYCL] Update parallel_for_range.cpp test #353

Merged
merged 4 commits into from
Jul 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions SYCL/Basic/parallel_for_range.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@

using namespace cl::sycl;

[[cl::reqd_work_group_size(4, 4, 4)]] void reqd_wg_size_helper() {
// do nothing
}

int main() {
auto AsyncHandler = [](exception_list ES) {
for (auto &E : ES) {
Expand Down Expand Up @@ -48,8 +44,8 @@ int main() {
try {
Q.submit([&](handler &CGH) {
CGH.parallel_for<class ReqdWGSizeNegativeA>(
nd_range<3>(range<3>(16, 16, 16), range<3>(8, 8, 8)),
[=](nd_item<3>) { reqd_wg_size_helper(); });
nd_range<3>(range<3>(16, 16, 16), range<3>(8, 8, 8)), [=
](nd_item<3>) [[sycl::reqd_work_group_size(4, 4, 4)]]{});
});
Q.wait_and_throw();
std::cerr
Expand Down Expand Up @@ -87,8 +83,8 @@ int main() {
try {
Q.submit([&](handler &CGH) {
CGH.parallel_for<class ReqdWGSizePositiveA>(
nd_range<3>(range<3>(8, 8, 8), range<3>(4, 4, 4)),
[=](nd_item<3>) { reqd_wg_size_helper(); });
nd_range<3>(range<3>(8, 8, 8), range<3>(4, 4, 4)), [=
](nd_item<3>) [[sycl::reqd_work_group_size(4, 4, 4)]]{});
});
Q.wait_and_throw();
} catch (nd_range_error &E) {
Expand Down