Fix NUMA async copy test

Change-Id: I64b5bd1ac5bf9b58d86c3dfc170bcf06a39abee4
This commit is contained in:
Chris Freehill
2018-07-11 13:36:35 -05:00
parent c6cf161125
commit 3cca09ccca
3 changed files with 11 additions and 3 deletions
@@ -92,6 +92,7 @@ MemoryAsyncCopy::MemoryAsyncCopy(void) :
pool_info()->clear();
node_info()->clear();
verified_ = true;
do_p2p_ = true;
src_pool_id_ = -1;
dst_pool_id_ = -1;
set_num_iteration(10); // Default value
@@ -809,7 +810,7 @@ void MemoryAsyncCopy::ConstructTransactionList(void) {
push_trans(cpu_pool_indx, gpu_local1_pool_indx, H2D);
push_trans(gpu_local1_pool_indx, cpu_pool_indx, D2H);
if (gpu_local2_pool_indx != -1) {
if (do_p2p_ && gpu_local2_pool_indx != -1) {
push_trans(gpu_local1_pool_indx, gpu_local2_pool_indx, P2P);
push_trans(gpu_local2_pool_indx, gpu_local1_pool_indx, P2P);
}
@@ -817,8 +818,10 @@ void MemoryAsyncCopy::ConstructTransactionList(void) {
if (gpu_remote_pool_indx != -1) {
push_trans(cpu_pool_indx, gpu_remote_pool_indx, H2DRemote);
push_trans(gpu_remote_pool_indx, cpu_pool_indx, D2HRemote);
push_trans(gpu_local1_pool_indx, gpu_remote_pool_indx, P2PRemote);
push_trans(gpu_remote_pool_indx, gpu_local1_pool_indx, P2PRemote);
if (do_p2p_) {
push_trans(gpu_local1_pool_indx, gpu_remote_pool_indx, P2PRemote);
push_trans(gpu_remote_pool_indx, gpu_local1_pool_indx, P2PRemote);
}
}
}
@@ -259,6 +259,9 @@ class MemoryAsyncCopy : public TestBase {
// Verification result
bool verified_;
// Should we test p2p copying?
bool do_p2p_;
// Store the testing level
int src_pool_id_;
int dst_pool_id_;
@@ -77,6 +77,8 @@ MemoryAsyncCopyNUMA::MemoryAsyncCopyNUMA(void) : MemoryAsyncCopy() {
"from memory pool to another. Host memory is allocated using NUMA "
"aware allocators. Bandwidth performance using NUMA should, at worst, "
"be as good as using the standard hsa allocator.");
do_p2p_ = false;
}
MemoryAsyncCopyNUMA::~MemoryAsyncCopyNUMA(void) {