Checking that number of requested GPUs is not more than number of available GPUs
[ROCm/rccl-tests commit: 043eef6999]
Tá an tiomantas seo le fáil i:
@@ -738,6 +738,15 @@ int main(int argc, char* argv[]) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int numDevices;
|
||||||
|
HIPCHECK(hipGetDeviceCount(&numDevices));
|
||||||
|
if (nGpus > numDevices)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "[ERROR] The number of requested GPUs (%d) is greater than the number of GPUs available (%d)\n", nGpus, numDevices);
|
||||||
|
return testNcclError;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef MPI_SUPPORT
|
#ifdef MPI_SUPPORT
|
||||||
MPI_Init(&argc, &argv);
|
MPI_Init(&argc, &argv);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir