Disable SDMA ganging on non-APU multi-partition modes
Work around SDMA hang in non-SPX modes for non-APU devices by disabling
ganging.
Root cause of hang not found.
non-APU xGMI modes have only 1 link between socket devices anyways so
there's likely no real system level gain in ganging intra-socket.
Change-Id: Ia4eda2f85cbf25151d3dbcf50cc45b8b775c60e2
[ROCm/ROCR-Runtime commit: ed462035fa]
This commit is contained in:
committed by
David Yat Sin
parent
1e46d28ee6
commit
f9a6578b6b
@@ -367,6 +367,17 @@ void BuildTopology() {
|
||||
}
|
||||
const_cast<Flag&>(core::Runtime::runtime_singleton_->flag()).parse_masks(maxGpu, maxCu);
|
||||
|
||||
// Temporary work-around, disable SDMA ganging on non-APUs in non-SPX modes
|
||||
// Check xGMI APU status
|
||||
bool isXgmiApu = false;
|
||||
auto& firstCpu = core::Runtime::runtime_singleton_->cpu_agents()[0];
|
||||
for (auto& peer_gpu : core::Runtime::runtime_singleton_->gpu_agents()) {
|
||||
auto linfo = core::Runtime::runtime_singleton_->GetLinkInfo(firstCpu->node_id(),
|
||||
peer_gpu->node_id());
|
||||
isXgmiApu = linfo.info.link_type == HSA_AMD_LINK_INFO_TYPE_XGMI;
|
||||
if (isXgmiApu) break;
|
||||
}
|
||||
|
||||
// Register destination agents that can SDMA gang copy for source agents
|
||||
for (auto& src_gpu : core::Runtime::runtime_singleton_->gpu_agents()) {
|
||||
uint32_t src_id = src_gpu->node_id();
|
||||
@@ -383,7 +394,7 @@ void BuildTopology() {
|
||||
// Weight of 41 - Inter-socket GPU link in multi-partition mode
|
||||
if (linfo.info.link_type == HSA_AMD_LINK_INFO_TYPE_XGMI) {
|
||||
if (linfo.info.numa_distance == 13 || linfo.info.numa_distance == 41)
|
||||
gang_factor = 2;
|
||||
gang_factor = isXgmiApu ? 2 : 1;
|
||||
else if (linfo.info.numa_distance == 15 && linfo.info.min_bandwidth)
|
||||
gang_factor = linfo.info.max_bandwidth/linfo.info.min_bandwidth;
|
||||
else gang_factor = 1;
|
||||
|
||||
Reference in New Issue
Block a user