Fixing GoogleTest to 1.8.1 and making changes to tests to support older API

This commit is contained in:
Gilbert Lee
2019-05-16 23:13:49 +00:00
parent 11f78df04d
commit 08fcce5ec9
8 changed files with 148 additions and 144 deletions
+22 -28
View File
@@ -43,7 +43,6 @@ namespace CorrectnessTests
size_t const elemCount = numElements / numDevices;
for (int i = 0; i < numDevices; i++)
{
HIP_CALL(hipSetDevice(i));
ncclAllGather((int8_t *)datasets[0].inputs[i] + (i * byteCount),
datasets[0].outputs[i], elemCount,
dataType, comms[i], streams[i]);
@@ -52,7 +51,6 @@ namespace CorrectnessTests
// AllReduce
for (int i = 0; i < numDevices; i++)
{
HIP_CALL(hipSetDevice(i));
ncclAllReduce(datasets[1].inputs[i], datasets[1].outputs[i],
numElements, dataType, op, comms[i], streams[i]);
}
@@ -60,7 +58,6 @@ namespace CorrectnessTests
// Broadcast
for (int i = 0; i < numDevices; i++)
{
HIP_CALL(hipSetDevice(i));
ncclBroadcast(datasets[2].inputs[i],
datasets[2].outputs[i],
numElements, dataType,
@@ -70,7 +67,6 @@ namespace CorrectnessTests
// Reduce
for (int i = 0; i < numDevices; i++)
{
HIP_CALL(hipSetDevice(i));
ncclReduce(datasets[3].inputs[i],
datasets[3].outputs[i],
numElements, dataType, op,
@@ -84,15 +80,13 @@ namespace CorrectnessTests
(int8_t *)datasets[4].outputs[i] + (i * byteCount),
elemCount, dataType, op,
comms[i], streams[i]);
HIP_CALL(hipSetDevice(i));
}
// Signal end of group call
ncclGroupEnd();
// Wait for reduction to complete
for (int i = 0; i < numDevices; i++)
hipStreamSynchronize(streams[i]);
Synchronize();
// Check results for each collective in the group
for (int i = 0; i < 5; i++)
@@ -101,25 +95,25 @@ namespace CorrectnessTests
}
}
INSTANTIATE_TEST_SUITE_P(GroupCallsCorrectnessSweep,
GroupCallsCorrectnessTest,
testing::Combine(
// Reduction operator (not used)
testing::Values(ncclSum),
// Data types
testing::Values(ncclInt8,
ncclUint8,
ncclInt32,
ncclUint32,
ncclInt64,
ncclUint64,
//ncclFloat16,
ncclFloat32,
ncclFloat64),
// Number of elements
testing::Values(3072, 3145728),
// Number of devices
testing::Values(2,3,4),
// In-place or not
testing::Values(false, true)));
INSTANTIATE_TEST_CASE_P(GroupCallsCorrectnessSweep,
GroupCallsCorrectnessTest,
testing::Combine(
// Reduction operator (not used)
testing::Values(ncclSum),
// Data types
testing::Values(ncclInt8,
ncclUint8,
ncclInt32,
ncclUint32,
ncclInt64,
ncclUint64,
//ncclFloat16,
ncclFloat32,
ncclFloat64),
// Number of elements
testing::Values(3072, 3145728),
// Number of devices
testing::Values(2,3,4),
// In-place or not
testing::Values(false, true)));
} // namespace