Skip to content

Commit 3740e5a

Browse files
[SYCL] [Graph] Fix print_graph (#19181)
Fixes #19177 --------- Co-authored-by: Ben Tracy <[email protected]>
1 parent b7d9ea9 commit 3740e5a

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

sycl/include/sycl/ext/oneapi/experimental/graph/modifiable_graph.hpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class __SYCL_EXPORT modifiable_command_graph
141141
/// @param path The path to write the DOT file to.
142142
/// @param verbose If true, print additional information about the nodes such
143143
/// as kernel args or memory access where applicable.
144-
#ifdef ___INTEL_PREVIEW_BREAKING_CHANGES
144+
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
145145
void print_graph(const std::string path, bool verbose = false) const {
146146
print_graph(sycl::detail::string_view{path}, verbose);
147147
}
@@ -210,6 +210,23 @@ class __SYCL_EXPORT modifiable_command_graph
210210
static void checkNodePropertiesAndThrow(const property_list &Properties);
211211
};
212212

213+
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
214+
#ifdef __SYCL_GRAPH_IMPL_CPP
215+
// Magic combination found by trial and error:
216+
__SYCL_EXPORT
217+
#if _WIN32
218+
inline
219+
#endif
220+
#else
221+
inline
222+
#endif
223+
void
224+
modifiable_command_graph::print_graph(const std::string path,
225+
bool verbose) const {
226+
print_graph(sycl::detail::string_view{path}, verbose);
227+
}
228+
#endif
229+
213230
} // namespace detail
214231
} // namespace experimental
215232
} // namespace oneapi

sycl/source/detail/graph/graph_impl.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,13 +2101,6 @@ void modifiable_command_graph::checkNodePropertiesAndThrow(
21012101
Properties, CheckDataLessProperties, CheckPropertiesWithData);
21022102
}
21032103

2104-
#ifndef ___INTEL_PREVIEW_BREAKING_CHANGES
2105-
void modifiable_command_graph::print_graph(const std::string path,
2106-
bool verbose) const {
2107-
print_graph(sycl::detail::string_view{path}, verbose);
2108-
}
2109-
#endif
2110-
21112104
executable_command_graph::executable_command_graph(
21122105
const std::shared_ptr<detail::graph_impl> &Graph, const sycl::context &Ctx,
21132106
const property_list &PropList)

sycl/source/detail/graph/node_impl.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#define __SYCL_GRAPH_IMPL_CPP
10-
119
#include "node_impl.hpp"
1210
#include "graph_impl.hpp" // for graph_impl
1311
#include <sycl/ext/oneapi/experimental/graph/node.hpp> // for node

sycl/test-e2e/Graph/AsyncAlloc/Inputs/async_alloc_device_memory_reuse_zero_init.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ int main() {
195195

196196
auto GraphExec = Graph.finalize();
197197

198-
Graph.print_graph("test.dot");
199-
200198
for (unsigned n = 0; n < Iterations; n++) {
201199
Queue.submit([&](handler &CGH) { CGH.ext_oneapi_graph(GraphExec); });
202200
}

0 commit comments

Comments
 (0)