From a7406bbd5df01b9b4675d9d69cb7515564f65730 Mon Sep 17 00:00:00 2001 From: Jaydeep Patel Date: Thu, 5 Dec 2024 07:35:21 +0000 Subject: [PATCH] SWDEV-502532 - Exit graph launch in case of empty graph. Change-Id: Ifb6ab14ca6810cbc1c9e38c59d1d9e7d367358d9 [ROCm/clr commit: 0d4823ff880947ec3f5818101e0e32b5889de175] --- projects/clr/hipamd/src/hip_graph.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/clr/hipamd/src/hip_graph.cpp b/projects/clr/hipamd/src/hip_graph.cpp index 96fd272f6d..2272f523a8 100644 --- a/projects/clr/hipamd/src/hip_graph.cpp +++ b/projects/clr/hipamd/src/hip_graph.cpp @@ -1497,6 +1497,9 @@ hipError_t hipGraphLaunch_common(hip::GraphExec* graphExec, hipStream_t stream) if (graphExec == nullptr || !hip::GraphExec::isGraphExecValid(graphExec)) { return hipErrorInvalidValue; } + if (graphExec->clonedNodes_.empty()) { + return hipSuccess; + } if (!hip::isValid(stream)) { return hipErrorContextIsDestroyed; }