SWDEV-377804 - Initial commit to support hipGraphInstantiateFlagAutoFreeOnLaunch

Change-Id: I7a35becb6c98a6ff70264e141317d98be7457a37
This commit is contained in:
Jaydeep Patel
2023-01-27 13:07:01 +00:00
committed by Jaydeepkumar Patel
parent 14477c24d0
commit f9e27bcdd4
5 changed files with 27 additions and 8 deletions
+5
View File
@@ -796,6 +796,11 @@ hipError_t hipGraphExec::Run(hipStream_t stream) {
if (queue == nullptr) {
return hipErrorInvalidResourceHandle;
}
if (flags_ == hipGraphInstantiateFlagAutoFreeOnLaunch) {
if (!levelOrder_.empty()) {
levelOrder_[0]->GetParentGraph()->FreeAllMemory();
}
}
UpdateQueue(parallelLists_, queue, this);
std::vector<amd::Command*> rootCommands;
amd::Command* endCommand = nullptr;