SWDEV-374369 - Fix hipGraphAdd*Node* APIs invalid behavior

- Return hipErrorInvalidValue if dependencies array contains a node from
  different graph

Change-Id: I0dcfaaaeb50a89848ac546a0b86b185977e2128c


[ROCm/clr commit: a427d3cd10]
이 커밋은 다음에 포함됨:
Rakesh Roy 작성하고 Rakesh Roy가 2023-01-13 12:09:42 -05:00를 커밋함
1 부모 61f59d2285
커밋 9045dbab4b
1 파일이 변경됨
+2 -1
+2 -1
파일 보기
@@ -32,7 +32,8 @@ inline hipError_t ihipGraphAddNode(hipGraphNode_t graphNode, hipGraph_t graph,
const hipGraphNode_t* pDependencies, size_t numDependencies) {
graph->AddNode(graphNode);
for (size_t i = 0; i < numDependencies; i++) {
if (!hipGraphNode::isNodeValid(pDependencies[i])) {
if ((!hipGraphNode::isNodeValid(pDependencies[i])) ||
(graph != pDependencies[i]->GetParentGraph())) {
return hipErrorInvalidValue;
}
pDependencies[i]->AddEdge(graphNode);