From e86d9ef9e2a06c4ee4d006f1fcd31611a9dcb3f7 Mon Sep 17 00:00:00 2001 From: Guo Yejun Date: Mon, 29 Apr 2024 19:36:01 -0700 Subject: [PATCH] [SYCL][Graph] fix the address pointer in graph print the address pointer should be the USM pointer --- sycl/source/detail/graph_impl.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sycl/source/detail/graph_impl.hpp b/sycl/source/detail/graph_impl.hpp index 9d8604316e8d5..f545ec329de9b 100644 --- a/sycl/source/detail/graph_impl.hpp +++ b/sycl/source/detail/graph_impl.hpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -596,6 +597,17 @@ class node_impl { } else if (Arg.MType == sycl::detail::kernel_param_kind_t::kind_pointer) { Type = "Pointer"; + auto Fill = Stream.fill(); + Stream << i << ") Type: " << Type << " Ptr: " << Arg.MPtr << "(0x" + << std::hex << std::setfill('0'); + for (int i = Arg.MSize - 1; i >= 0; --i) { + Stream << std::setw(2) + << static_cast( + (static_cast(Arg.MPtr))[i]); + } + Stream.fill(Fill); + Stream << std::dec << ")\\n"; + continue; } else if (Arg.MType == sycl::detail::kernel_param_kind_t:: kind_specialization_constants_buffer) { Type = "Specialization Constants Buffer";