diff --git a/rocrtst/suites/performance/memory_async_copy.cc b/rocrtst/suites/performance/memory_async_copy.cc index 287637bfbc..1ad0a2ddbd 100755 --- a/rocrtst/suites/performance/memory_async_copy.cc +++ b/rocrtst/suites/performance/memory_async_copy.cc @@ -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); + } } } diff --git a/rocrtst/suites/performance/memory_async_copy.h b/rocrtst/suites/performance/memory_async_copy.h index 906b9f7f14..ad0b227b6d 100755 --- a/rocrtst/suites/performance/memory_async_copy.h +++ b/rocrtst/suites/performance/memory_async_copy.h @@ -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_; diff --git a/rocrtst/suites/performance/memory_async_copy_numa.cc b/rocrtst/suites/performance/memory_async_copy_numa.cc index 76d1d61d45..bfd83527f0 100755 --- a/rocrtst/suites/performance/memory_async_copy_numa.cc +++ b/rocrtst/suites/performance/memory_async_copy_numa.cc @@ -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) {