From 7cc414a49804d5ccd62546056f86ade3de3574d6 Mon Sep 17 00:00:00 2001 From: "Khatavkar, Yashasvi" Date: Wed, 18 Jun 2025 09:30:20 -0700 Subject: [PATCH 1/2] add standalone_debug attribute to sycl::device class --- sycl/include/sycl/device.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sycl/include/sycl/device.hpp b/sycl/include/sycl/device.hpp index a5b00d87db677..e0789b4dc7250 100644 --- a/sycl/include/sycl/device.hpp +++ b/sycl/include/sycl/device.hpp @@ -58,12 +58,17 @@ enum class peer_access { }; } // namespace ext::oneapi +#if __has_cpp_attribute(_Clang::__standalone_debug__) +#define PLATFORM_SPECIFIC_ATTRIBUTE [[_Clang::__standalone_debug__]] +#else +#define PLATFORM_SPECIFIC_ATTRIBUTE +#endif /// The SYCL device class encapsulates a single SYCL device on which kernels /// may be executed. /// /// \ingroup sycl_api -class __SYCL_EXPORT device : public detail::OwnerLessBase { +class PLATFORM_SPECIFIC_ATTRIBUTE __SYCL_EXPORT device : public detail::OwnerLessBase { public: /// Constructs a SYCL device instance using the default device. device(); From bffcb1cafc223538d60375f54a276c09d1b374e8 Mon Sep 17 00:00:00 2001 From: "Khatavkar, Yashasvi" Date: Wed, 18 Jun 2025 09:40:33 -0700 Subject: [PATCH 2/2] apply clang-format --- sycl/include/sycl/device.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sycl/include/sycl/device.hpp b/sycl/include/sycl/device.hpp index e0789b4dc7250..3800f9dd49eeb 100644 --- a/sycl/include/sycl/device.hpp +++ b/sycl/include/sycl/device.hpp @@ -68,7 +68,8 @@ enum class peer_access { /// may be executed. /// /// \ingroup sycl_api -class PLATFORM_SPECIFIC_ATTRIBUTE __SYCL_EXPORT device : public detail::OwnerLessBase { +class PLATFORM_SPECIFIC_ATTRIBUTE __SYCL_EXPORT device + : public detail::OwnerLessBase { public: /// Constructs a SYCL device instance using the default device. device();