From 36426531734c8ff4ad7f55d9f8258d2b42fbbaf6 Mon Sep 17 00:00:00 2001 From: Alexander Batashev Date: Fri, 7 Aug 2020 21:25:06 +0300 Subject: [PATCH 1/2] [SYCL] Improve kernel demangling in graph printing Update demangling to work when toolchain is built with Clang. Signed-off-by: Alexander Batashev --- sycl/source/detail/scheduler/commands.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index f21d39d8efc3d..f85b225ac59d5 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -30,11 +30,14 @@ #include #include -#ifdef __GNUG__ +#if defined __has_include +#if __has_include() +#define __SYCL_ENABLE_GNU_DEMANGLING #include #include #include #endif +#endif #ifdef XPTI_ENABLE_INSTRUMENTATION #include "xpti_trace_framework.hpp" @@ -49,7 +52,7 @@ namespace detail { extern xpti::trace_event_data_t *GSYCLGraphEvent; #endif -#ifdef __GNUG__ +#ifdef __SYCL_ENABLE_GNU_DEMANGLING struct DemangleHandle { char *p; DemangleHandle(char *ptr) : p(ptr) {} From 62194f5658a52ea1c203269af2d62759aedc18c8 Mon Sep 17 00:00:00 2001 From: Alexander Batashev Date: Sat, 8 Aug 2020 15:44:32 +0300 Subject: [PATCH 2/2] Update sycl/source/detail/scheduler/commands.cpp Co-authored-by: Vyacheslav Klochkov <34946562+v-klochkov@users.noreply.github.com> --- sycl/source/detail/scheduler/commands.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index f85b225ac59d5..77a81657d42ae 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -30,7 +30,7 @@ #include #include -#if defined __has_include +#ifdef __has_include #if __has_include() #define __SYCL_ENABLE_GNU_DEMANGLING #include