2
0

SWDEV-505276 - Parent graph of orig node and original graph of cloned node should be same.

Change-Id: I6ebc21cc42e41ad5d952a69fb3b3cb095f32cffb


[ROCm/clr commit: dff8197b1d]
Este cometimento está contido em:
Jaydeep Patel
2024-12-18 11:47:09 +00:00
cometido por Jaydeepkumar Patel
ascendente da613fbbeb
cometimento f20f399915
+5 -2
Ver ficheiro
@@ -2174,12 +2174,15 @@ hipError_t hipGraphNodeFindInClone(hipGraphNode_t* pNode, hipGraphNode_t origina
HIP_RETURN(hipErrorInvalidValue);
}
hip::Graph* iClonedGraph = reinterpret_cast<hip::Graph*>(clonedGraph);
if (iClonedGraph->getOriginalGraph() == nullptr) {
hip::GraphNode* iGraphnode = reinterpret_cast<hip::GraphNode*>(originalNode);
if (iClonedGraph->getOriginalGraph() == nullptr ||
// parent graph of orig node and original graph of cloned node should be same.
iClonedGraph->getOriginalGraph() != iGraphnode->GetParentGraph()) {
HIP_RETURN(hipErrorInvalidValue);
}
for (auto node : iClonedGraph->GetNodes()) {
if (node->GetID() == reinterpret_cast<hip::GraphNode*>(originalNode)->GetID()) {
if (node->GetID() == iGraphnode->GetID()) {
*pNode = reinterpret_cast<hipGraphNode_t>(node);
HIP_RETURN(hipSuccess);
}