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

Commit ac90159

Browse files
committed
Fix the check for sub-groups availability. It returned false even when device had support for sub-groups
Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent c3f7aeb commit ac90159

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SYCL/SubGroup/helper.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ void exit_if_not_equal_vec(vec<T, N> val, vec<T, N> ref, const char *name) {
154154
}
155155

156156
bool core_sg_supported(const device &Device) {
157-
return (Device.has_extension("cl_khr_subgroups") ||
158-
Device.get_info<info::device::version>().find(" 2.1") !=
159-
string_class::npos);
157+
if (Device.has_extension("cl_khr_subgroups"))
158+
return true;
159+
return Device.get_info<info::device::version>() >= "2.1";
160160
}

0 commit comments

Comments
 (0)