Print msg for single gpu
Change-Id: I2d23c73542add8973990ba96592016726994422e
This commit is contained in:
committed by
Maneesh Gupta
orang tua
2335bcdd03
melakukan
3bc6df2044
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user