Skip to content

Commit 08aee16

Browse files
marandjesaleelk
authored andcommitted
SWDEV-499794 - Update AQL packet after updating GraphNode
Change-Id: I332d70bdf42a276894a548a02d636e370c2ca08c
1 parent f0063ba commit 08aee16

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

hipamd/src/hip_graph.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3385,17 +3385,27 @@ hipError_t hipGraphExecNodeSetParams(hipGraphExec_t graphExec, hipGraphNode_t no
33853385
hipGraphNodeParams* nodeParams) {
33863386
HIP_INIT_API(hipGraphNodeSetParams, graphExec, node, nodeParams);
33873387
hip::GraphNode* n = reinterpret_cast<hip::GraphNode*>(node);
3388-
if (node == nullptr || nodeParams == nullptr || graphExec == nullptr
3389-
|| !hip::GraphNode::isNodeValid(n)) {
3388+
if (node == nullptr || nodeParams == nullptr || graphExec == nullptr ||
3389+
!hip::GraphNode::isNodeValid(n)) {
33903390
HIP_RETURN(hipErrorInvalidValue);
33913391
}
33923392
hip::GraphNode* clonedNode = reinterpret_cast<hip::GraphNode*>(
33933393
reinterpret_cast<hip::GraphExec*>(graphExec)->GetClonedNode(n));
33943394
if (clonedNode == nullptr) {
33953395
HIP_RETURN(hipErrorInvalidValue);
33963396
}
3397-
HIP_RETURN(ihipGraphNodeSetParams(clonedNode, nodeParams));
3397+
3398+
hipError_t status = ihipGraphNodeSetParams(clonedNode, nodeParams);
3399+
if (status != hipSuccess) {
3400+
return status;
3401+
}
3402+
3403+
if (DEBUG_CLR_GRAPH_PACKET_CAPTURE) {
3404+
status = reinterpret_cast<hip::GraphExec*>(graphExec)->UpdateAQLPacket(clonedNode);
3405+
}
3406+
return status;
33983407
}
3408+
33993409
hipError_t hipDrvGraphMemcpyNodeGetParams(hipGraphNode_t hNode, HIP_MEMCPY3D* nodeParams) {
34003410
HIP_INIT_API(hipDrvGraphMemcpyNodeGetParams, hNode, nodeParams);
34013411
if (!hip::GraphNode::isNodeValid(reinterpret_cast<hip::GraphNode*>(hNode)) ||

0 commit comments

Comments
 (0)