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

Change-Id: Iebef5ae68439d87549fdf9559de51c6c79c64392


[ROCm/clr commit: 0d2e0d1621]
Cette révision appartient à :
Ioannis Assiouras
2023-01-10 14:28:39 +00:00
Parent 967ad97993
révision 1974ef22cf
+5 -1
Voir le fichier
@@ -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;
}