Skip to content

Commit a35f862

Browse files
authored
[SYCL][Graph] fix the address pointer in graph print (#13595)
the address pointer should be the USM pointer
1 parent d6a18e1 commit a35f862

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sycl/source/detail/graph_impl.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <deque>
2525
#include <fstream>
2626
#include <functional>
27+
#include <iomanip>
2728
#include <list>
2829
#include <set>
2930
#include <shared_mutex>
@@ -618,6 +619,17 @@ class node_impl {
618619
} else if (Arg.MType ==
619620
sycl::detail::kernel_param_kind_t::kind_pointer) {
620621
Type = "Pointer";
622+
auto Fill = Stream.fill();
623+
Stream << i << ") Type: " << Type << " Ptr: " << Arg.MPtr << "(0x"
624+
<< std::hex << std::setfill('0');
625+
for (int i = Arg.MSize - 1; i >= 0; --i) {
626+
Stream << std::setw(2)
627+
<< static_cast<int16_t>(
628+
(static_cast<unsigned char *>(Arg.MPtr))[i]);
629+
}
630+
Stream.fill(Fill);
631+
Stream << std::dec << ")\\n";
632+
continue;
621633
} else if (Arg.MType == sycl::detail::kernel_param_kind_t::
622634
kind_specialization_constants_buffer) {
623635
Type = "Specialization Constants Buffer";

0 commit comments

Comments
 (0)