From 902dadc476617379a8d38206d6f2183b657acf62 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:43:54 -0400 Subject: [PATCH] [SYCL] Add alternative to deprecated barrier() function for sub-group (#13276) Add an alternative in the deprecation message for barrier() method on a sub-group. This should help clients move closer to conformant code. --- sycl/include/sycl/sub_group.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sycl/include/sycl/sub_group.hpp b/sycl/include/sycl/sub_group.hpp index a60fe9037a3cd..7cdae68724788 100644 --- a/sycl/include/sycl/sub_group.hpp +++ b/sycl/include/sycl/sub_group.hpp @@ -554,7 +554,9 @@ struct sub_group { } /* --- synchronization functions --- */ - __SYCL_DEPRECATED("Sub-group barrier with no arguments is deprecated.") + __SYCL_DEPRECATED( + "Sub-group barrier with no arguments is deprecated." + "Use sycl::group_barrier with the sub-group as the argument instead.") void barrier() const { #ifdef __SYCL_DEVICE_ONLY__ __spirv_ControlBarrier( @@ -569,8 +571,9 @@ struct sub_group { #endif } - __SYCL_DEPRECATED("Sub-group barrier accepting fence_space is deprecated." - "Use barrier() without a fence_space instead.") + __SYCL_DEPRECATED( + "Sub-group barrier accepting fence_space is deprecated." + "Use sycl::group_barrier with the sub-group as the argument instead.") void barrier(access::fence_space accessSpace) const { #ifdef __SYCL_DEVICE_ONLY__ int32_t flags = sycl::detail::getSPIRVMemorySemanticsMask(accessSpace);