Skip to content
Permalink
Browse files

Use NUMA distance for hop count calculation

  • Loading branch information...
wenkaidu committed May 15, 2019
1 parent 70f01fa commit e8e58e9ce5f7145150b857569966c445c1374f9c
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/hip_device.cpp
@@ -574,9 +574,10 @@ hipError_t hipExtGetLinkTypeAndHopCount(int device1, int device2, uint32_t* link
HSA_ERROR_CHECK(err);
*linktype = link_info.link_type;

err = hsa_amd_agent_memory_pool_get_info(device1Handle->_hsaAgent, pool, HSA_AMD_AGENT_MEMORY_POOL_INFO_NUM_LINK_HOPS, hopcount);
HSA_ERROR_CHECK(err);

if (link_info.numa_distance < 30)
*hopcount = 1;
else
*hopcount = 2;
return ihipLogStatus(hipSuccess);
}
}

0 comments on commit e8e58e9

Please sign in to comment.
You can’t perform that action at this time.