SWDEV-374403 - Added input sanity checks for hipLaunchCooperativeKernelMultiDevice and hipExtLaunchMultiKernelMultiDevice

Change-Id: Iebef5ae68439d87549fdf9559de51c6c79c64392


[ROCm/clr commit: 0d2e0d1621]
이 커밋은 다음에 포함됨:
Ioannis Assiouras
2023-01-10 14:28:39 +00:00
부모 967ad97993
커밋 1974ef22cf
+5 -1
파일 보기
@@ -508,7 +508,11 @@ hipError_t ihipModuleLaunchCooperativeKernelMultiDevice(hipFunctionLaunchParams*
hipError_t result = hipSuccess;
result = ihipDeviceGetCount(&numActiveGPUs);
if (numDevices > numActiveGPUs) {
if ((numDevices == 0) || (numDevices > numActiveGPUs)) {
return hipErrorInvalidValue;
}
if ((flags < 0) || (flags > hipCooperativeLaunchMultiDeviceNoPostSync)) {
return hipErrorInvalidValue;
}