SWDEV-421025 - Graph Instantiate with Params API Update

Change-Id: I3ed821ced02420858d360e8dab5e1e931c350c7e


[ROCm/clr commit: f964975db0]
This commit is contained in:
Rahul Manocha
2024-02-05 23:02:59 +00:00
parent bef39a9369
commit b564fbef5d
+6 -1
View File
@@ -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<hip::Graph*>(graph), flags);
*pGraphExec = reinterpret_cast<hipGraphExec_t>(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);
}