SWDEV-316991 - Returns hipErrorInvalidValue when a wrong node type is passed to hipGraphExecEventWaitNodeSetEvent and hipGraphExecEventRecordNodeSetEvent APIs

Change-Id: Ic80b0b2b154e017b41af617f5049e037a1b66183


[ROCm/clr commit: f73ff54fda]
Cette révision appartient à :
Sourabh Betigeri a créé et Sourabh Betigeri a révisé 2022-03-22 18:09:10 -04:00
1 Parent 993b9f790c
révision 636464ff5f
1 fichier modifié
+4 -2
+4 -2
Voir le fichier
@@ -1638,7 +1638,8 @@ hipError_t hipGraphEventRecordNodeSetEvent(hipGraphNode_t node, hipEvent_t event
hipError_t hipGraphExecEventRecordNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode,
hipEvent_t event) {
HIP_INIT_API(hipGraphExecEventRecordNodeSetEvent, hGraphExec, hNode, event);
if (hGraphExec == nullptr || hNode == nullptr || event == nullptr) {
if (hGraphExec == nullptr || hNode == nullptr || event == nullptr ||
hNode->GetType() != hipGraphNodeTypeEventRecord) {
HIP_RETURN(hipErrorInvalidValue);
}
hipGraphNode_t clonedNode = hGraphExec->GetClonedNode(hNode);
@@ -1683,7 +1684,8 @@ hipError_t hipGraphEventWaitNodeSetEvent(hipGraphNode_t node, hipEvent_t event)
hipError_t hipGraphExecEventWaitNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode,
hipEvent_t event) {
HIP_INIT_API(hipGraphExecEventWaitNodeSetEvent, hGraphExec, hNode, event);
if (hGraphExec == nullptr || hNode == nullptr || event == nullptr) {
if (hGraphExec == nullptr || hNode == nullptr || event == nullptr ||
(hNode->GetType() != hipGraphNodeTypeWaitEvent)) {
HIP_RETURN(hipErrorInvalidValue);
}
hipGraphNode_t clonedNode = hGraphExec->GetClonedNode(hNode);