From fefff25364d8d780d9fa3cac70cfb876f3e5cc4d Mon Sep 17 00:00:00 2001 From: sdashmiz Date: Mon, 28 Nov 2022 15:00:37 -0500 Subject: [PATCH] SWDEV-367833 - return success for null stream - return success for query on null stream Signed-off-by: sdashmiz Change-Id: Ifc2cf705e1962565c68de7b1777f870c5a4d56cf --- hipamd/src/hip_graph.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hipamd/src/hip_graph.cpp b/hipamd/src/hip_graph.cpp index 37c2ea9a3b..7225eb5593 100644 --- a/hipamd/src/hip_graph.cpp +++ b/hipamd/src/hip_graph.cpp @@ -1460,7 +1460,8 @@ hipError_t hipStreamGetCaptureInfo_common(hipStream_t stream, return hipErrorStreamCaptureImplicit; } if (stream == nullptr) { - return hipErrorUnknown; + *pCaptureStatus = hipStreamCaptureStatusNone; + return hipSuccess; } hip::Stream* s = reinterpret_cast(stream); *pCaptureStatus = s->GetCaptureStatus(); @@ -1495,7 +1496,8 @@ hipError_t hipStreamGetCaptureInfo_v2_common(hipStream_t stream, return hipErrorStreamCaptureImplicit; } if (stream == nullptr) { - return hipErrorUnknown; + *captureStatus_out = hipStreamCaptureStatusNone; + return hipSuccess; } if (!hip::isValid(stream)) { return hipErrorInvalidValue;