SWDEV-490864 - Optimize Alloc Node detection in graph
Change-Id: I6ac32f9abd0b44864071a0a9396463cb13f6941f
[ROCm/clr commit: 314d4a2c22]
This commit is contained in:
committed by
Rahul Manocha
parent
04628d2d1f
commit
5b40eefdac
@@ -837,13 +837,10 @@ hipError_t GraphExec::Run(hipStream_t graph_launch_stream) {
|
||||
|
||||
// If this is a repeat launch, make sure corresponding MemFreeNode exists for a MemAlloc node
|
||||
if (repeatLaunch_ == true) {
|
||||
for (auto& node : topoOrder_) {
|
||||
if (node->GetType() == hipGraphNodeTypeMemAlloc &&
|
||||
static_cast<GraphMemAllocNode*>(node)->IsActiveMem() == true) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
if (topoOrder_[0]->GetParentGraph()->GetMemAllocNodeCount() > 0) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
repeatLaunch_ = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user