Fix hipMemoryAllocate test for single GPU

Change-Id: If121c18ab490ba125dc689ffc08a8839fd280c38
This commit is contained in:
Maneesh Gupta
2017-05-31 10:16:57 +05:30
parent 5cdd1b2bf5
commit 502a74fcd6
@@ -36,7 +36,6 @@ void multiGpuHostAlloc(int allocDevice)
int numDevices;
HIPCHECK(hipGetDeviceCount(&numDevices));
assert(numDevices > 1);
printf ("info: trying multiGpuHostAlloc with allocDevice=%d numDevices=%d\n", allocDevice, numDevices);
@@ -121,10 +120,12 @@ int main(int argc, char *argv[])
{
int numDevices;
HIPCHECK(hipGetDeviceCount(&numDevices));
assert(numDevices > 1);
multiGpuHostAlloc(0);
multiGpuHostAlloc(1);
if (numDevices > 1)
{
multiGpuHostAlloc(1);
}
}
passed();