Skip to content

Commit 3696d7b

Browse files
[SYCL] Don't export print_graph(std::string, bool) under -fpreview_breaking_changes (#16390)
Follow-up for #16194. We must keep exporting it for backward ABI compatibility by default, but that isn't necessary for the next major release (which `-fpreview_breaking_changes` covers).
1 parent f7fcca7 commit 3696d7b

File tree

1 file changed

+8
-0
lines changed
  • sycl/include/sycl/ext/oneapi/experimental

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,13 @@ class __SYCL_EXPORT modifiable_command_graph
340340
/// @param path The path to write the DOT file to.
341341
/// @param verbose If true, print additional information about the nodes such
342342
/// as kernel args or memory access where applicable.
343+
#ifdef ___INTEL_PREVIEW_BREAKING_CHANGES
344+
void print_graph(const std::string path, bool verbose = false) const {
345+
print_graph(sycl::detail::string_view{path}, verbose);
346+
}
347+
#else
343348
void print_graph(const std::string path, bool verbose = false) const;
349+
#endif
344350

345351
/// Get a list of all nodes contained in this graph.
346352
std::vector<node> get_nodes() const;
@@ -387,6 +393,7 @@ class __SYCL_EXPORT modifiable_command_graph
387393
std::shared_ptr<detail::graph_impl> impl;
388394
};
389395

396+
#ifndef ___INTEL_PREVIEW_BREAKING_CHANGES
390397
#ifdef __SYCL_GRAPH_IMPL_CPP
391398
// Magic combination found by trial and error:
392399
__SYCL_EXPORT
@@ -401,6 +408,7 @@ inline
401408
bool verbose) const {
402409
print_graph(sycl::detail::string_view{path}, verbose);
403410
}
411+
#endif
404412

405413
// Templateless executable command-graph base class.
406414
class __SYCL_EXPORT executable_command_graph

0 commit comments

Comments
 (0)