Fix tests to account for multi-gpu

[ROCm/hip commit: 3ecd1b1539]
这个提交包含在:
Ben Sander 于 2016-02-15 05:19:52 -06:00 提交
1 父节点 9e60e519d4
当前提交 9ccdbdca71
2 个文件已更改
+6 -1

没有与搜索条件相匹配的文件

+3
查看文件
@@ -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() );
+3 -1
查看文件
@@ -289,6 +289,7 @@ void clusterAllocs(int numAllocs, size_t minSize, size_t maxSize)
for (int i =0; i<numDevices; i++) {
size_t free, total;
HIPCHECK(hipSetDevice(i));
HIPCHECK(hipMemGetInfo(&free, &total));
printf (" device#%d: hipMemGetInfo: free=%zu (%4.2fMB) clusterAllocTotalDevice=%lu (%4.2fMB) total=%zu (%4.2fMB)\n",
i, free, (float)(free/1024.0/1024.0), totalDeviceAllocated[i], (float)(totalDeviceAllocated[i])/1024.0/1024.0, total, (float)(total/1024.0/1024.0));
@@ -452,7 +453,6 @@ int main(int argc, char *argv[])
N= 1000000;
HipTest::parseStandardArguments(argc, argv, true);
HIPCHECK(hipSetDevice(p_gpuDevice));
Nbytes = N*sizeof(char);
@@ -460,6 +460,8 @@ int main(int argc, char *argv[])
if (p_tests & 0x01) {
printf ("info: set device to %d\n", p_gpuDevice);
HIPCHECK(hipSetDevice(p_gpuDevice));
testSimple();
}