From 32b9969db36ad0db6b2a86d30e142a12e14f53d8 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 3 Feb 2022 00:38:00 +0000 Subject: [PATCH] SWDEV-315614 - hipStreamGetCaptureInfo to return seq id based on status Change-Id: Ibceeb67fcd60b3ad2272e08a3ee682dc36bda1cb --- hipamd/src/hip_graph.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hipamd/src/hip_graph.cpp b/hipamd/src/hip_graph.cpp index 1cc286ec15..a851ee3348 100644 --- a/hipamd/src/hip_graph.cpp +++ b/hipamd/src/hip_graph.cpp @@ -1144,7 +1144,9 @@ hipError_t hipStreamGetCaptureInfo(hipStream_t stream, hipStreamCaptureStatus* p } hip::Stream* s = reinterpret_cast(stream); *pCaptureStatus = s->GetCaptureStatus(); - *pId = s->GetCaptureID(); + if (*pCaptureStatus == hipStreamCaptureStatusActive) { + *pId = s->GetCaptureID(); + } HIP_RETURN(hipSuccess); }