Fix query HSA_AMD_AGENT_MEMORY_POOL_INFO_LINK_INFO
Querying HSA_AMD_AGENT_MEMORY_POOL_INFO_LINK_INFO between a gpu agent
and its own local memory pool returns a wrong information.
Fix: return link with 0 hop count.
[git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1257544]
[ROCm/ROCR-Runtime commit: 5a584fa1ab]
이 커밋은 다음에 포함됨:
@@ -87,6 +87,8 @@ class Runtime {
|
||||
public:
|
||||
/// @brief Structure to describe connectivity between agents.
|
||||
struct LinkInfo {
|
||||
LinkInfo() : num_hop(0), info{0} {}
|
||||
|
||||
uint32_t num_hop;
|
||||
hsa_amd_memory_pool_link_info_t info;
|
||||
};
|
||||
@@ -133,7 +135,7 @@ class Runtime {
|
||||
/// @param [in] node_id_from Node id of the source node.
|
||||
/// @param [in] node_id_to Node id of the destination node.
|
||||
/// @retval The link information between source and destination nodes.
|
||||
const LinkInfo& GetLinkInfo(uint32_t node_id_from, uint32_t node_id_to);
|
||||
const LinkInfo GetLinkInfo(uint32_t node_id_from, uint32_t node_id_to);
|
||||
|
||||
/// @brief Invoke the user provided call back for each agent in the agent
|
||||
/// list.
|
||||
|
||||
@@ -263,9 +263,11 @@ void Runtime::RegisterLinkInfo(uint32_t node_id_from, uint32_t node_id_to,
|
||||
link_matrix_[idx].info = link_info;
|
||||
}
|
||||
|
||||
const Runtime::LinkInfo& Runtime::GetLinkInfo(uint32_t node_id_from,
|
||||
uint32_t node_id_to) {
|
||||
return link_matrix_[GetIndexLinkInfo(node_id_from, node_id_to)];
|
||||
const Runtime::LinkInfo Runtime::GetLinkInfo(uint32_t node_id_from,
|
||||
uint32_t node_id_to) {
|
||||
return (node_id_from != node_id_to)
|
||||
? link_matrix_[GetIndexLinkInfo(node_id_from, node_id_to)]
|
||||
: LinkInfo(); // No link.
|
||||
}
|
||||
|
||||
uint32_t Runtime::GetIndexLinkInfo(uint32_t node_id_from, uint32_t node_id_to) {
|
||||
|
||||
새 이슈에서 참조
사용자 차단