Skip to content

Commit

Permalink
Reduce hardware requirements for maximum work-group size in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fknorr committed Jan 18, 2022
1 parent 76f49c9 commit 008a868
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/runtime_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2156,6 +2156,8 @@ namespace detail {
TEST_CASE("handler::parallel_for accepts nd_range", "[handler]") {
distr_queue q;

// Note: be careful about local range sizes here, not all devices support work groups with > 256 elements.

CHECK_NOTHROW(q.submit([&](handler& cgh) {
cgh.parallel_for<class UKN(nd_range_1)>(celerity::nd_range<1>{{256}, {64}}, [](nd_item<1> item) {
group_barrier(item.get_group());
Expand All @@ -2175,10 +2177,10 @@ namespace detail {
}));

CHECK_NOTHROW(q.submit([&](handler& cgh) {
cgh.parallel_for<class UKN(nd_range_3)>(celerity::nd_range<3>{{32, 32, 32}, {8, 8, 8}}, [](nd_item<3> item) {
cgh.parallel_for<class UKN(nd_range_3)>(celerity::nd_range<3>{{16, 16, 16}, {4, 4, 4}}, [](nd_item<3> item) {
group_barrier(item.get_group());
#if !WORKAROUND_COMPUTECPP // no group primitives
group_broadcast(item.get_group(), 42, {2, 4, 6});
group_broadcast(item.get_group(), 42, {1, 2, 3});
#endif
});
}));
Expand Down

0 comments on commit 008a868

Please sign in to comment.