From afbe451b0da2a25b1e5f05497f04e6286e45f12c Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Mon, 15 Feb 2016 05:19:52 -0600 Subject: [PATCH] Fix tests to account for multi-gpu --- hipamd/tests/src/hipMemcpy.cpp | 3 +++ hipamd/tests/src/hipPointerAttrib.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hipamd/tests/src/hipMemcpy.cpp b/hipamd/tests/src/hipMemcpy.cpp index 3502b81e9d..b76f98c687 100644 --- a/hipamd/tests/src/hipMemcpy.cpp +++ b/hipamd/tests/src/hipMemcpy.cpp @@ -212,6 +212,9 @@ int main(int argc, char *argv[]) { HipTest::parseStandardArguments(argc, argv, true); + printf ("info: set device to %d\n", p_gpuDevice); + HIPCHECK(hipSetDevice(p_gpuDevice)); + if (p_tests & 0x1) { HIPCHECK ( hipDeviceReset() ); diff --git a/hipamd/tests/src/hipPointerAttrib.cpp b/hipamd/tests/src/hipPointerAttrib.cpp index 1418997274..12856da984 100644 --- a/hipamd/tests/src/hipPointerAttrib.cpp +++ b/hipamd/tests/src/hipPointerAttrib.cpp @@ -289,6 +289,7 @@ void clusterAllocs(int numAllocs, size_t minSize, size_t maxSize) for (int i =0; i