Skip to content

Commit 6bdb9ee

Browse files
committed
[SYCL] Fix use_root_sync handling
Signed-off-by: Hu, Peisen <[email protected]>
1 parent a8d7f08 commit 6bdb9ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sycl/include/sycl/handler.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,9 @@ class __SYCL_EXPORT handler {
829829

830830
constexpr bool UsesRootSync = PropertiesT::template has_property<
831831
sycl::ext::oneapi::experimental::use_root_sync_key>();
832-
setKernelIsCooperative(UsesRootSync);
832+
if (UsesRootSync) {
833+
setKernelIsCooperative(UsesRootSync);
834+
}
833835
if constexpr (PropertiesT::template has_property<
834836
sycl::ext::oneapi::experimental::
835837
work_group_progress_key>()) {

0 commit comments

Comments
 (0)