Skip to content

Commit

Permalink
graph: allow access to native graph object
Browse files Browse the repository at this point in the history
The native graph objects should be accessible for advanced users.
  • Loading branch information
romintomasetti committed Mar 28, 2024
1 parent a53d30a commit c4a50e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/Cuda/Kokkos_Cuda_Graph_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ struct GraphImpl<Kokkos::Cuda> {
m_execution_space, _graph_node_kernel_ctor_tag{},
aggregate_kernel_impl_t{});
}

const cudaGraph_t get_native_graph() const { return m_graph; }
const cudaGraphExec_t get_native_executable_graph() const { return m_graph_exec; }
};

} // end namespace Impl
Expand Down
3 changes: 3 additions & 0 deletions core/src/HIP/Kokkos_HIP_Graph_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ class GraphImpl<Kokkos::HIP> {
template <class... PredecessorRefs>
auto create_aggregate_ptr(PredecessorRefs&&...);

const hipGraph_t get_native_graph() const { return m_graph; }
const hipGraphExec_t get_native_executable_graph() const { return m_graph_exec; }

private:
void instantiate_graph() {
constexpr size_t error_log_size = 256;
Expand Down

0 comments on commit c4a50e1

Please sign in to comment.