SWDEV-313213 - hipGraphDestroy issues

Change-Id: Idf3ede5ea29161b9e5753e8beb245b1f9fd86d28
This commit is contained in:
Ajay
2022-03-10 19:52:29 +00:00
parent 1af17d765d
commit 42137222ad
+4
View File
@@ -824,6 +824,10 @@ hipError_t hipGraphDestroy(hipGraph_t graph) {
if (graph == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
// if graph is not valid its destroyed already
if (!ihipGraph::isGraphValid(graph)) {
HIP_RETURN(hipErrorInvalidValue);
}
delete graph;
HIP_RETURN(hipSuccess);
}