From 8ff2bcd48d1bbfadb6e749ae9480b64f07752b86 Mon Sep 17 00:00:00 2001 From: Harish Kasiviswanathan Date: Fri, 11 Mar 2016 11:15:02 -0500 Subject: [PATCH] Fix indirect io_links Connect only (Peer-to-Peer) GPUs that belong to same NUMA node. Without this additional check non direct GPUs would also get connected. Change-Id: I9a5ed19b8f06cd0527854cbbdb51ede99eade28b --- src/topology.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/topology.c b/src/topology.c index 5dfb8ca8f4..2724260473 100644 --- a/src/topology.c +++ b/src/topology.c @@ -952,6 +952,14 @@ static void topology_create_indirect_gpu_links(uint32_t cpu_node, temp_nodes[props[j].NodeTo].gpu_id == 0) continue; + /* For the given cpu_node, connect to or from the GPUs that are + * connected directly to it via PCIEXPRESS */ + if ((temp_nodes[props[i].NodeTo].gpu_id != 0 && + props[i].IoLinkType != HSA_IOLINKTYPE_PCIEXPRESS) || + (temp_nodes[props[j].NodeTo].gpu_id != 0 && + props[j].IoLinkType != HSA_IOLINKTYPE_PCIEXPRESS)) + continue; + /* The link is from GPU to non-parent NUMA node. So set link type * to HT */ if (temp_nodes[props[i].NodeTo].gpu_id == 0 ||