SWDEV-374390 - add correct error

- null stream should return error on host function

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I17659ad7af0814091dbf6cb4a2cb2644514551f0
This commit is contained in:
sdashmiz
2023-01-10 12:15:13 -05:00
committed by Shadi Dashmiz
parent 7eecbdd9db
commit 338307ef2c
+3
View File
@@ -674,6 +674,9 @@ 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) {
HIP_RETURN(hipErrorStreamCaptureImplicit);
}
HIP_RETURN(hipLaunchHostFunc_common(stream, fn, userData));
}