From dccbc9f2af2cab57f1ce718421d3d0e202e3ed64 Mon Sep 17 00:00:00 2001 From: Ramesh Errabolu Date: Mon, 16 Oct 2017 20:06:27 -0500 Subject: [PATCH] Changes to support surfacing of link weight as part of link info Change-Id: I1c0705a9374af1245f0419c51beded0d7ee10639 --- runtime/hsa-runtime/core/runtime/amd_topology.cpp | 1 + runtime/hsa-runtime/inc/hsa_ext_amd.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/runtime/hsa-runtime/core/runtime/amd_topology.cpp b/runtime/hsa-runtime/core/runtime/amd_topology.cpp index b54292554d..69e5f811e4 100644 --- a/runtime/hsa-runtime/core/runtime/amd_topology.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_topology.cpp @@ -131,6 +131,7 @@ void RegisterLinkInfo(uint32_t node_id, uint32_t num_link) { link_info.max_latency = io_link.MaximumLatency; link_info.min_bandwidth = io_link.MinimumBandwidth; link_info.min_latency = io_link.MinimumLatency; + link_info.numa_distance = io_link.Weight; core::Runtime::runtime_singleton_->RegisterLinkInfo( io_link.NodeFrom, io_link.NodeTo, io_link.Weight, link_info); diff --git a/runtime/hsa-runtime/inc/hsa_ext_amd.h b/runtime/hsa-runtime/inc/hsa_ext_amd.h index 905aa31851..28031b30f2 100755 --- a/runtime/hsa-runtime/inc/hsa_ext_amd.h +++ b/runtime/hsa-runtime/inc/hsa_ext_amd.h @@ -973,6 +973,10 @@ typedef struct hsa_amd_memory_pool_link_info_s { */ hsa_amd_link_info_type_t link_type; + /** + * NUMA distance of memory pool relative to querying agent + */ + uint32_t numa_distance; } hsa_amd_memory_pool_link_info_t; /**