From a4dd362a1dbc81c0b4618527cff58892a6ec0aea Mon Sep 17 00:00:00 2001 From: sdashmiz Date: Tue, 24 Jan 2023 10:31:18 -0500 Subject: [PATCH] SWDEV-379151 - correct error status - if the stream is null ptr and there is capture ongoing return an error Signed-off-by: sdashmiz Change-Id: Iff33e4aebc253fb7bb56daf5c455722d726c6705 --- hipamd/src/hip_stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hipamd/src/hip_stream.cpp b/hipamd/src/hip_stream.cpp index 3d1e9168dc..35d673b953 100644 --- a/hipamd/src/hip_stream.cpp +++ b/hipamd/src/hip_stream.cpp @@ -695,7 +695,7 @@ hipError_t hipLaunchHostFunc_spt(hipStream_t stream, hipHostFn_t fn, void* userD // ================================================================================================ hipError_t hipLaunchHostFunc(hipStream_t stream, hipHostFn_t fn, void* userData) { HIP_INIT_API(hipLaunchHostFunc, stream, fn, userData); - if (stream == nullptr) { + if (stream == nullptr && (hip::Stream::StreamCaptureOngoing() == true)) { HIP_RETURN(hipErrorStreamCaptureImplicit); } HIP_RETURN(hipLaunchHostFunc_common(stream, fn, userData));