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

Change-Id: Iebef5ae68439d87549fdf9559de51c6c79c64392


[ROCm/clr commit: 0d2e0d1621]
Цей коміт міститься в:
Ioannis Assiouras committed 2023-01-13 19:48:42 -05:00
1 джерело 967ad97993
коміт 1974ef22cf
1 file changed
+5 -1
+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;
}