SWDEV-457316 - Release graph exec before stream gets deleted.

Releasing graph exec after wait completes and before delete hip::stream obj
during stream destroy.

Change-Id: I1d68aa8d844f7d3af330c6d09c44af07f8553551
Этот коммит содержится в:
Jaydeep Patel
2024-08-01 10:00:15 +00:00
коммит произвёл Jaydeepkumar Patel
родитель b0047d690a
Коммит 8e80429b87
3 изменённых файлов: 10 добавлений и 1 удалений
+1 -1
Просмотреть файл
@@ -54,7 +54,7 @@ namespace hip {
std::unordered_map<GraphExec *, std::pair<hip::Stream *, bool>>
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;
+3
Просмотреть файл
@@ -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);
+6
Просмотреть файл
@@ -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