From 502a74fcd678635e59f3d7f16d95c1f000e39343 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Wed, 31 May 2017 10:16:57 +0530 Subject: [PATCH] Fix hipMemoryAllocate test for single GPU Change-Id: If121c18ab490ba125dc689ffc08a8839fd280c38 --- tests/src/runtimeApi/memory/hipMemoryAllocate.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/src/runtimeApi/memory/hipMemoryAllocate.cpp b/tests/src/runtimeApi/memory/hipMemoryAllocate.cpp index 1ee5cbc9bb..34951f0a09 100644 --- a/tests/src/runtimeApi/memory/hipMemoryAllocate.cpp +++ b/tests/src/runtimeApi/memory/hipMemoryAllocate.cpp @@ -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();