SWDEV-369572 - Check for valid stream before capture

Change-Id: I712ce136327ad459a048d84d1caeec506ed1cc39


[ROCm/clr commit: 6847427dd4]
This commit is contained in:
Ioannis Assiouras
2022-11-24 15:44:38 +00:00
parent 63d37c8ae7
commit 1ac4a6e0c3
+8
View File
@@ -391,6 +391,10 @@ hipError_t hipModuleLaunchKernel(hipFunction_t f, uint32_t gridDimX, uint32_t gr
HIP_INIT_API(hipModuleLaunchKernel, f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY,
blockDimZ, sharedMemBytes, hStream, kernelParams, extra);
if (!hip::isValid(hStream)) {
HIP_RETURN(hipErrorInvalidValue);
}
STREAM_CAPTURE(hipModuleLaunchKernel, hStream, f, gridDimX, gridDimY, gridDimZ, blockDimX,
blockDimY, blockDimZ, sharedMemBytes, kernelParams, extra);
@@ -418,6 +422,10 @@ hipError_t hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
localWorkSizeX, localWorkSizeY, localWorkSizeZ, sharedMemBytes, hStream,
kernelParams, extra, startEvent, stopEvent, flags);
if (!hip::isValid(hStream)) {
HIP_RETURN(hipErrorInvalidValue);
}
STREAM_CAPTURE(hipExtModuleLaunchKernel, hStream, f, globalWorkSizeX, globalWorkSizeY,
globalWorkSizeZ, localWorkSizeX, localWorkSizeY, localWorkSizeZ, sharedMemBytes,
kernelParams, extra, startEvent, stopEvent, flags);