From b564fbef5db4de76b3312c670e9d19a3a38a2103 Mon Sep 17 00:00:00 2001 From: Rahul Manocha Date: Mon, 5 Feb 2024 23:02:59 +0000 Subject: [PATCH] SWDEV-421025 - Graph Instantiate with Params API Update Change-Id: I3ed821ced02420858d360e8dab5e1e931c350c7e [ROCm/clr commit: f964975db0cadbf57460db32bac8a7f7d19b1b6c] --- projects/clr/hipamd/src/hip_graph.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/clr/hipamd/src/hip_graph.cpp b/projects/clr/hipamd/src/hip_graph.cpp index d1f490afe1..dd2ead4937 100644 --- a/projects/clr/hipamd/src/hip_graph.cpp +++ b/projects/clr/hipamd/src/hip_graph.cpp @@ -1302,6 +1302,7 @@ hipError_t hipGraphInstantiateWithParams(hipGraphExec_t* pGraphExec, hipGraph_t if (flags != 0 && flags != hipGraphInstantiateFlagAutoFreeOnLaunch && flags != hipGraphInstantiateFlagUpload && flags != hipGraphInstantiateFlagDeviceLaunch && flags != hipGraphInstantiateFlagUseNodePriority) { + instantiateParams->result_out = hipGraphInstantiateError; HIP_RETURN(hipErrorInvalidValue); } @@ -1309,10 +1310,14 @@ hipError_t hipGraphInstantiateWithParams(hipGraphExec_t* pGraphExec, hipGraph_t hipError_t status = ihipGraphInstantiate(&ge, reinterpret_cast(graph), flags); *pGraphExec = reinterpret_cast(ge); if(status != hipSuccess){ + instantiateParams->result_out = hipGraphInstantiateError; HIP_RETURN(status); } - if (flags == hipGraphInstantiateFlagUpload) { + instantiateParams->result_out = hipGraphInstantiateSuccess; + instantiateParams->errNode_out = nullptr; + + if(flags == hipGraphInstantiateFlagUpload) { hipError_t status = ihipGraphUpload(*pGraphExec, instantiateParams->uploadStream); HIP_RETURN(status); }