From 855eb801ebc982a933c79f99ceaa330738b8abe5 Mon Sep 17 00:00:00 2001 From: Sarbojit Sarkar Date: Mon, 24 Jan 2022 16:37:21 +0000 Subject: [PATCH] SWDEV-316792 - Fix for Event node Change-Id: Ibb402648212c4d1d198e44ad9d166a2776805739 [ROCm/clr commit: a48429e922a2577fe14a91bddcca9103ac8aa039] --- projects/clr/hipamd/src/hip_graph.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/clr/hipamd/src/hip_graph.cpp b/projects/clr/hipamd/src/hip_graph.cpp index f73584ed07..ab8ec06a7e 100644 --- a/projects/clr/hipamd/src/hip_graph.cpp +++ b/projects/clr/hipamd/src/hip_graph.cpp @@ -1199,6 +1199,7 @@ hipError_t hipStreamGetCaptureInfo_v2(hipStream_t stream, hipStreamCaptureStatus *graph_out = s->GetCaptureGraph(); } if (dependencies_out != nullptr && numDependencies_out != nullptr) { + auto t= s->GetLastCapturedNodes().data(); *dependencies_out = s->GetLastCapturedNodes().data(); *numDependencies_out = s->GetLastCapturedNodes().size(); } @@ -1560,7 +1561,8 @@ hipError_t hipGraphEventWaitNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_ hipError_t hipGraphEventWaitNodeSetEvent(hipGraphNode_t node, hipEvent_t event) { HIP_INIT_API(hipGraphEventWaitNodeSetEvent, node, event); - if (node == nullptr || event == nullptr) { + if (node == nullptr || event == nullptr || + node->GetType() != hipGraphNodeTypeWaitEvent) { HIP_RETURN(hipErrorInvalidValue); } HIP_RETURN(reinterpret_cast(node)->SetParams(event));