SWDEV-450052 - Return if numDevices is more than device count on the platform

Change-Id: I538106d1b02084df9cd06b41427629207312e76f


[ROCm/clr commit: 64e1b15551]
This commit is contained in:
Sourabh Betigeri authored and Sourabh Betigeri committed 2024-10-24 17:07:11 -04:00
1 parent 5e2b090e68
commit 78d068f153
1 file changed
+1 -1
+1 -1
View File
@@ -817,7 +817,7 @@ hipError_t hipLaunchCooperativeKernel_spt(const void* f, dim3 gridDim, dim3 bloc
hipError_t ihipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsList, int numDevices,
unsigned int flags, uint32_t extFlags) {
if (launchParamsList == nullptr) {
if (launchParamsList == nullptr || numDevices > g_devices.size()) {
return hipErrorInvalidValue;
}