SWDEV-316819 - graph check ChildGraphNodeGetGraph
Change-Id: Id3a4fb64e6fb5ce37e97f1f3518e09c8bd9a2d0c
[ROCm/clr commit: 8618b1cd07]
이 커밋은 다음에 포함됨:
1 부모
2a3f5a5321
커밋
8a6fd0bd65
2 파일이 변경됨
+4
-3
검색과 일치하는 파일 없음
@@ -1211,11 +1211,11 @@ hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNo
|
||||
|
||||
hipError_t hipGraphChildGraphNodeGetGraph(hipGraphNode_t node, hipGraph_t* pGraph) {
|
||||
HIP_INIT_API(hipGraphChildGraphNodeGetGraph, node, pGraph);
|
||||
if (node == nullptr || pGraph == nullptr) {
|
||||
if (node == nullptr || pGraph == nullptr || !hipGraphNode::isNodeValid(node)) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
*pGraph = reinterpret_cast<hipChildGraphNode*>(node)->GetChildGraph();
|
||||
if (pGraph == nullptr) {
|
||||
*pGraph = reinterpret_cast<hipGraphNode*>(node)->GetChildGraph();
|
||||
if (*pGraph == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
HIP_RETURN(hipSuccess);
|
||||
|
||||
@@ -224,6 +224,7 @@ struct hipGraphNode {
|
||||
}
|
||||
}
|
||||
ihipGraph* GetParentGraph() { return parentGraph_; }
|
||||
virtual ihipGraph* GetChildGraph() { return nullptr; }
|
||||
void SetParentGraph(ihipGraph* graph) { parentGraph_ = graph; }
|
||||
virtual hipError_t SetParams(hipGraphNode* node) { return hipSuccess; }
|
||||
};
|
||||
|
||||
새 이슈에서 참조
사용자 차단