SWDEV-403382 - param sanity check

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ibddb2be7d0543676ed9aed71ebb3f5877662c9ae


[ROCm/clr commit: 5f93a59798]
This commit is contained in:
sdashmiz
2023-06-20 10:50:03 -04:00
committed by Shadi Dashmiz
parent 9cb5f95a56
commit f07e8cbc95
+2 -2
View File
@@ -201,7 +201,7 @@ hipError_t hipSignalExternalSemaphoresAsync(
unsigned int numExtSems, hipStream_t stream )
{
HIP_INIT_API(hipSignalExternalSemaphoresAsync, extSemArray, paramsArray, numExtSems, stream);
if (extSemArray == nullptr || paramsArray == nullptr) {
if (extSemArray == nullptr || paramsArray == nullptr || !hip::isValid(stream)) {
HIP_RETURN(hipErrorInvalidValue);
}
hip::Stream* hip_stream = hip::getStream(stream);
@@ -233,7 +233,7 @@ hipError_t hipWaitExternalSemaphoresAsync(const hipExternalSemaphore_t* extSemAr
{
HIP_INIT_API(hipWaitExternalSemaphoresAsync, extSemArray, paramsArray, numExtSems,
stream);
if (extSemArray == nullptr || paramsArray == nullptr) {
if (extSemArray == nullptr || paramsArray == nullptr || !hip::isValid(stream)) {
HIP_RETURN(hipErrorInvalidValue);
}
hip::Stream* hip_stream = hip::getStream(stream);