From 64e00377436f1d14038d94142eea293be551186c Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Wed, 16 Aug 2023 10:51:22 -0400 Subject: [PATCH] Break when finding ganged agent There's no need to keep looking in the list once we find a ganged agent. Change-Id: Ia0b9b484c88221a7966a814456942c19b1741978 [ROCm/ROCR-Runtime commit: f8664e88e06f74d1e04aae77e36f387e9b68d794] --- .../runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp | 1 + 1 file changed, 1 insertion(+) 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 ba4d804482..3c3a7ebc5f 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 @@ -896,6 +896,7 @@ hsa_status_t GpuAgent::DmaCopy(void* dst, core::Agent& dst_agent, if (dst_agent.public_handle().handle == peer_info.first.public_handle().handle) { tmp_gang_factor = peer_info.second; + break; } }