SWDEV-313492 - adding Graph null checks

Change-Id: I00ae51ea8318567b4f6aab1568096d25cc0d373b


[ROCm/clr commit: d27c33aecc]
This commit is contained in:
Payam
2022-02-15 09:49:35 -05:00
committato da Payam Ghafari
parent 67d88bd915
commit 60437939e7
+6
Vedi File
@@ -887,8 +887,14 @@ hipError_t hipGraphAddChildGraphNode(hipGraphNode_t* pGraphNode, hipGraph_t grap
}
hipError_t ihipGraphInstantiate(hipGraphExec_t* pGraphExec, hipGraph_t graph) {
if (pGraphExec == nullptr || graph == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
std::unordered_map<Node, Node> clonedNodes;
hipGraph_t clonedGraph = graph->clone(clonedNodes);
if (clonedGraph == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
std::vector<std::vector<Node>> parallelLists;
std::unordered_map<Node, std::vector<Node>> nodeWaitLists;
clonedGraph->GetRunList(parallelLists, nodeWaitLists);