Print msg for single gpu
Change-Id: I2d23c73542add8973990ba96592016726994422e
[ROCm/clr commit: e104c2e3bf]
Этот коммит содержится в:
коммит произвёл
Maneesh Gupta
родитель
81354999e8
Коммит
b22fdeb171
@@ -55,13 +55,9 @@ void checkPeer2PeerSupport()
|
||||
{
|
||||
int gpuCount;
|
||||
int canAccessPeer;
|
||||
int p2pCapableDeviceCount=0;
|
||||
|
||||
HIPCHECK(hipGetDeviceCount(&gpuCount));
|
||||
|
||||
if (gpuCount < 2)
|
||||
printf("Peer2Peer application requires atleast 2 gpu devices");
|
||||
|
||||
for (int currentGpu=0; currentGpu<gpuCount; currentGpu++)
|
||||
{
|
||||
HIPCHECK(hipSetDevice(currentGpu));
|
||||
@@ -161,6 +157,12 @@ int main(){
|
||||
|
||||
HIPCHECK(hipGetDeviceCount(&gpuCount));
|
||||
|
||||
if (gpuCount < 2)
|
||||
{
|
||||
printf("Peer2Peer application requires atleast 2 gpu devices");
|
||||
return 0;
|
||||
}
|
||||
|
||||
currentGpu = 0;
|
||||
peerGpu = (currentGpu + 1);
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user