diff --git a/projects/clr/hipamd/src/hip_graph_internal.cpp b/projects/clr/hipamd/src/hip_graph_internal.cpp index f9d62d6751..4c42eedf41 100644 --- a/projects/clr/hipamd/src/hip_graph_internal.cpp +++ b/projects/clr/hipamd/src/hip_graph_internal.cpp @@ -54,7 +54,7 @@ namespace hip { std::unordered_map> GraphExecStatus_ ROCCLR_INIT_PRIORITY(101); amd::Monitor GraphExecStatusLock_ ROCCLR_INIT_PRIORITY(101){ - "Guards graph execution state"}; + "Guards graph execution state", true}; int GraphNode::nextID = 0; int Graph::nextID = 0; diff --git a/projects/clr/hipamd/src/hip_internal.hpp b/projects/clr/hipamd/src/hip_internal.hpp index 1e27dff5da..a53affd19a 100644 --- a/projects/clr/hipamd/src/hip_internal.hpp +++ b/projects/clr/hipamd/src/hip_internal.hpp @@ -342,6 +342,9 @@ public: static bool StreamCaptureBlocking(); static void Destroy(hip::Stream* stream); + + virtual bool terminate(); + /// Check Stream Capture status to make sure it is done static bool StreamCaptureOngoing(hipStream_t hStream); diff --git a/projects/clr/hipamd/src/hip_stream.cpp b/projects/clr/hipamd/src/hip_stream.cpp index afa526b7d6..58bcdf68e2 100644 --- a/projects/clr/hipamd/src/hip_stream.cpp +++ b/projects/clr/hipamd/src/hip_stream.cpp @@ -77,6 +77,12 @@ void Stream::Destroy(hip::Stream* stream) { stream->release(); } +// ================================================================================================ +bool Stream::terminate() { + HostQueue::terminate(); + ReleaseGraphExec(this); + return true; +} // ================================================================================================ bool isValid(hipStream_t& stream) { // NULL stream is always valid