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
[ROCm/clr commit: 8e80429b87]
This commit is contained in:
committed by
Jaydeepkumar Patel
parent
82474ca1db
commit
12eea11370
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user