From 4117655e91b612da45c4937cec623e87e76f4b40 Mon Sep 17 00:00:00 2001 From: Payam Date: Mon, 14 Mar 2022 17:36:38 -0400 Subject: [PATCH] SWDEV-317494 - Graph - allowing empty params hipHostNodeParams should work without any parameters for the userData Change-Id: Iee32c3ba87000e29ed037ee507f7da9ea54988a3 --- hipamd/src/hip_graph.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hipamd/src/hip_graph.cpp b/hipamd/src/hip_graph.cpp index 4a67f3cd16..f504c48cec 100644 --- a/hipamd/src/hip_graph.cpp +++ b/hipamd/src/hip_graph.cpp @@ -1685,12 +1685,10 @@ hipError_t hipGraphAddHostNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipHostNodeParams* pNodeParams) { HIP_INIT_API(hipGraphAddHostNode, pGraphNode, graph, pDependencies, numDependencies, pNodeParams); if (pGraphNode == nullptr || graph == nullptr || pNodeParams == nullptr || - (numDependencies > 0 && pDependencies == nullptr)) { - HIP_RETURN(hipErrorInvalidValue); - } - if (pNodeParams->fn == nullptr || pNodeParams->userData == nullptr) { + (numDependencies > 0 && pDependencies == nullptr) || pNodeParams->fn == nullptr) { HIP_RETURN(hipErrorInvalidValue); } + *pGraphNode = new hipGraphHostNode(pNodeParams); hipError_t status = ihipGraphAddNode(*pGraphNode, graph, pDependencies, numDependencies); HIP_RETURN(status);