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

Change-Id: I538106d1b02084df9cd06b41427629207312e76f
This commit is contained in:
Sourabh Betigeri
2024-09-26 17:35:43 -07:00
committato da Sourabh Betigeri
parent 6f30ae102c
commit 64e1b15551
+1 -1
Vedi 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;
}