Skip to content

[SYCL] [Graph] Fix print_graph #19181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class __SYCL_EXPORT modifiable_command_graph
/// @param path The path to write the DOT file to.
/// @param verbose If true, print additional information about the nodes such
/// as kernel args or memory access where applicable.
#ifdef ___INTEL_PREVIEW_BREAKING_CHANGES
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
void print_graph(const std::string path, bool verbose = false) const {
print_graph(sycl::detail::string_view{path}, verbose);
}
Expand Down Expand Up @@ -210,6 +210,23 @@ class __SYCL_EXPORT modifiable_command_graph
static void checkNodePropertiesAndThrow(const property_list &Properties);
};

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
#ifdef __SYCL_GRAPH_IMPL_CPP
// Magic combination found by trial and error:
__SYCL_EXPORT
#if _WIN32
inline
#endif
#else
inline
#endif
void
modifiable_command_graph::print_graph(const std::string path,
bool verbose) const {
print_graph(sycl::detail::string_view{path}, verbose);
}
#endif

} // namespace detail
} // namespace experimental
} // namespace oneapi
Expand Down
7 changes: 0 additions & 7 deletions sycl/source/detail/graph/graph_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2101,13 +2101,6 @@ void modifiable_command_graph::checkNodePropertiesAndThrow(
Properties, CheckDataLessProperties, CheckPropertiesWithData);
}

#ifndef ___INTEL_PREVIEW_BREAKING_CHANGES
void modifiable_command_graph::print_graph(const std::string path,
bool verbose) const {
print_graph(sycl::detail::string_view{path}, verbose);
}
#endif

executable_command_graph::executable_command_graph(
const std::shared_ptr<detail::graph_impl> &Graph, const sycl::context &Ctx,
const property_list &PropList)
Expand Down
2 changes: 0 additions & 2 deletions sycl/source/detail/graph/node_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//

#define __SYCL_GRAPH_IMPL_CPP

#include "node_impl.hpp"
#include "graph_impl.hpp" // for graph_impl
#include <sycl/ext/oneapi/experimental/graph/node.hpp> // for node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ int main() {

auto GraphExec = Graph.finalize();

Graph.print_graph("test.dot");

for (unsigned n = 0; n < Iterations; n++) {
Queue.submit([&](handler &CGH) { CGH.ext_oneapi_graph(GraphExec); });
}
Expand Down
Loading