SWDEV-401781 - Auto Clean removes from map so check before remove while submit mem alloc node command.

Change-Id: Id004f75b307c2c769dee556c3d18e781830bcae1
This commit is contained in:
Jaydeep Patel
2023-06-23 13:03:10 +00:00
committed by Jaydeepkumar Patel
parent aa7c62db37
commit a8164d3e12
2 changed files with 8 additions and 6 deletions
+3 -3
View File
@@ -578,9 +578,11 @@ hipError_t hipGraphExec::Run(hipStream_t stream) {
if (hip::getStream(stream) == nullptr) {
return hipErrorInvalidResourceHandle;
}
auto hip_stream = (stream == nullptr) ? hip::getCurrentDevice()->NullStream()
: reinterpret_cast<hip::Stream*>(stream);
if (flags_ & hipGraphInstantiateFlagAutoFreeOnLaunch) {
if (!topoOrder_.empty()) {
topoOrder_[0]->GetParentGraph()->FreeAllMemory();
topoOrder_[0]->GetParentGraph()->FreeAllMemory(hip_stream);
}
}
@@ -597,8 +599,6 @@ hipError_t hipGraphExec::Run(hipStream_t stream) {
repeatLaunch_ = true;
}
auto hip_stream = (stream == nullptr) ? hip::getCurrentDevice()->NullStream()
: reinterpret_cast<hip::Stream*>(stream);
UpdateStream(parallelLists_, hip_stream, this);
std::vector<amd::Command*> rootCommands;
amd::Command* endCommand = nullptr;