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

Commit ecc67a2

Browse files
authored
[SYCL] Disable sort over sub-group for CUDA and HIP BEs (#1396)
CUDA and HIP BE do not support intel::reqd_sub_group_size, so it's not possible to control sub-group size which is needed to get the size of temporary memory for sort algorithm.
1 parent 4365f38 commit ecc67a2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

SYCL/GroupAlgorithm/SYCL2020/sort.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//
2222
// TODO: Test global memory for temporary storage
2323
// TODO: Consider using USM instead of buffers
24-
//
24+
// TODO: Add support for sorting over workgroup for CUDA and HIP BE
2525

2626
#include <sycl/sycl.hpp>
2727

@@ -312,12 +312,18 @@ template <class T> void RunOverType(sycl::queue &Q, size_t DataSize) {
312312
RunSortOVerGroup<UseGroupT::WorkGroup, 1>(Q, Data, Comparator);
313313
RunSortOVerGroup<UseGroupT::WorkGroup, 2>(Q, Data, Comparator);
314314

315-
RunSortOVerGroup<UseGroupT::SubGroup, 1>(Q, Data, Comparator);
316-
RunSortOVerGroup<UseGroupT::SubGroup, 2>(Q, Data, Comparator);
317-
318315
RunJointSort<UseGroupT::WorkGroup, 1>(Q, Data, Comparator);
319316
RunJointSort<UseGroupT::WorkGroup, 2>(Q, Data, Comparator);
320317

318+
if (Q.get_backend() == sycl::backend::ext_oneapi_cuda ||
319+
Q.get_backend() == sycl::backend::ext_oneapi_hip) {
320+
std::cout << "Note! Skipping sub group testing on CUDA BE" << std::endl;
321+
return;
322+
}
323+
324+
RunSortOVerGroup<UseGroupT::SubGroup, 1>(Q, Data, Comparator);
325+
RunSortOVerGroup<UseGroupT::SubGroup, 2>(Q, Data, Comparator);
326+
321327
RunJointSort<UseGroupT::SubGroup, 1>(Q, Data, Comparator);
322328
RunJointSort<UseGroupT::SubGroup, 2>(Q, Data, Comparator);
323329
};

0 commit comments

Comments
 (0)