From 5f5adf0b09261f365ff92d19f41cb46ec9602254 Mon Sep 17 00:00:00 2001 From: sdashmiz Date: Fri, 19 Nov 2021 15:23:25 -0500 Subject: [PATCH] SWDEV-312099 - hipsteam capture API status report fix Signed-off-by: sdashmiz Change-Id: Iee0bbad978f3ca89ff81e5a8583c0aa9cfcb4098 [ROCm/clr commit: 981125aaccddf76b39e0f1984474b62ffb57eefb] --- projects/clr/hipamd/src/hip_graph.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/src/hip_graph.cpp b/projects/clr/hipamd/src/hip_graph.cpp index e861951ced..3975c1e0ca 100644 --- a/projects/clr/hipamd/src/hip_graph.cpp +++ b/projects/clr/hipamd/src/hip_graph.cpp @@ -678,10 +678,14 @@ hipError_t capturehipLaunchHostFunc(hipStream_t& stream, hipHostFn_t& fn, void*& hipError_t hipStreamIsCapturing(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus) { HIP_INIT_API(hipStreamIsCapturing, stream, pCaptureStatus); - if (stream == nullptr || !hip::isValid(stream)) { + if (pCaptureStatus == nullptr || !hip::isValid(stream)) { HIP_RETURN(hipErrorInvalidValue); } - *pCaptureStatus = reinterpret_cast(stream)->GetCaptureStatus(); + if (stream == nullptr) { + *pCaptureStatus = hipStreamCaptureStatusNone; + } else { + *pCaptureStatus = reinterpret_cast(stream)->GetCaptureStatus(); + } HIP_RETURN(hipSuccess); }