diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 7ddf19ca69..33cbca3f7a 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -902,7 +902,6 @@ hsa_status_t GpuAgent::DmaCopy(void* dst, core::Agent& dst_agent, } int gang_factor = 0; - uint32_t gang_mask = 0; // Use non-D2D (auxillary) SDMA engines in the event of xGMI D2D support // when xGMI SDMA context is not available. bool has_aux_gang = tmp_gang_factor >= properties_.NumSdmaEngines && !!!properties_.NumSdmaXgmiEngines; @@ -925,7 +924,6 @@ hsa_status_t GpuAgent::DmaCopy(void* dst, core::Agent& dst_agent, } } - gang_mask |= 1 << i; gang_factor++; } @@ -961,9 +959,6 @@ hsa_status_t GpuAgent::DmaCopy(void* dst, core::Agent& dst_agent, bool gang_leader_set = false; int gang_sig_count = 0; for (int i = 0; i < gang_factor; i++) { - if (gang_factor > 1 && !!!(gang_mask & (1 << i))) - continue; - // Set leader and gang status to blit SetCopyRequestRefCount(true); lazy_ptr& blit = has_aux_gang ? blits_[i + 1] : diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_topology.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_topology.cpp index 1f5aa53109..d8cf5e2130 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_topology.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_topology.cpp @@ -376,7 +376,6 @@ void BuildTopology() { continue; auto linfo = core::Runtime::runtime_singleton_->GetLinkInfo(src_id, dst_id); - GpuAgent *gpu = (AMD::GpuAgent*)src_gpu; // xGMI link type cannot determine bandwidth keep it fixed for ganging bool has_fixed_gang = linfo.info.link_type == HSA_AMD_LINK_INFO_TYPE_XGMI && linfo.info.numa_distance != 15; @@ -392,7 +391,7 @@ void BuildTopology() { uint32_t gang_factor = has_fixed_gang ? 2 : (linfo.info.min_bandwidth ? linfo.info.max_bandwidth/linfo.info.min_bandwidth : 0); - gpu->RegisterGangPeer(*dst_gpu, gang_factor); + ((AMD::GpuAgent*)src_gpu)->RegisterGangPeer(*dst_gpu, gang_factor); } } }