From 36ba23642669ed99ed19a8bb2d7f4cd10c12e112 Mon Sep 17 00:00:00 2001 From: Marko Arandjelovic Date: Mon, 25 Nov 2024 16:11:18 +0200 Subject: [PATCH] SWDEV-499794 - Update AQL packet after updating GraphNode Change-Id: I332d70bdf42a276894a548a02d636e370c2ca08c [ROCm/clr commit: 08aee16573616dc561007f1eb103e7a08c82f456] --- projects/clr/hipamd/src/hip_graph.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/projects/clr/hipamd/src/hip_graph.cpp b/projects/clr/hipamd/src/hip_graph.cpp index 5e80ad9921..77e261c025 100644 --- a/projects/clr/hipamd/src/hip_graph.cpp +++ b/projects/clr/hipamd/src/hip_graph.cpp @@ -3385,8 +3385,8 @@ hipError_t hipGraphExecNodeSetParams(hipGraphExec_t graphExec, hipGraphNode_t no hipGraphNodeParams* nodeParams) { HIP_INIT_API(hipGraphNodeSetParams, graphExec, node, nodeParams); hip::GraphNode* n = reinterpret_cast(node); - if (node == nullptr || nodeParams == nullptr || graphExec == nullptr - || !hip::GraphNode::isNodeValid(n)) { + if (node == nullptr || nodeParams == nullptr || graphExec == nullptr || + !hip::GraphNode::isNodeValid(n)) { HIP_RETURN(hipErrorInvalidValue); } hip::GraphNode* clonedNode = reinterpret_cast( @@ -3394,8 +3394,18 @@ hipError_t hipGraphExecNodeSetParams(hipGraphExec_t graphExec, hipGraphNode_t no if (clonedNode == nullptr) { HIP_RETURN(hipErrorInvalidValue); } - HIP_RETURN(ihipGraphNodeSetParams(clonedNode, nodeParams)); + + hipError_t status = ihipGraphNodeSetParams(clonedNode, nodeParams); + if (status != hipSuccess) { + return status; + } + + if (DEBUG_CLR_GRAPH_PACKET_CAPTURE) { + status = reinterpret_cast(graphExec)->UpdateAQLPacket(clonedNode); + } + return status; } + hipError_t hipDrvGraphMemcpyNodeGetParams(hipGraphNode_t hNode, HIP_MEMCPY3D* nodeParams) { HIP_INIT_API(hipDrvGraphMemcpyNodeGetParams, hNode, nodeParams); if (!hip::GraphNode::isNodeValid(reinterpret_cast(hNode)) ||