From 0e4e17db27cd915e80ea885389c89dd0bf77212e 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 [ROCm/clr commit: 06ee0d3704acf23031fc6a0388ee0663f91fae28] --- .../tests/src/runtimeApi/memory/hipMemoryAllocate.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemoryAllocate.cpp b/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemoryAllocate.cpp index 1ee5cbc9bb..34951f0a09 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/memory/hipMemoryAllocate.cpp +++ b/projects/clr/hipamd/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();