Add support to retrieve XGMI hive id
Change-Id: I1eee05dd85ecb856889d1cfe0565454d2f538856 Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
This commit is contained in:
@@ -3064,6 +3064,22 @@ rsmi_dev_xgmi_error_reset(uint32_t dv_ind) {
|
||||
CATCH
|
||||
}
|
||||
|
||||
rsmi_status_t
|
||||
rsmi_dev_xgmi_hive_id_get(uint32_t dv_ind, uint64_t *hive_id) {
|
||||
TRY
|
||||
|
||||
if (hive_id == nullptr) {
|
||||
return RSMI_STATUS_INVALID_ARGS;
|
||||
}
|
||||
|
||||
GET_DEV_AND_KFDNODE_FROM_INDX
|
||||
|
||||
*hive_id = kfd_node->xgmi_hive_id();
|
||||
|
||||
return RSMI_STATUS_SUCCESS;
|
||||
CATCH
|
||||
}
|
||||
|
||||
rsmi_status_t
|
||||
rsmi_topo_get_numa_node_number(uint32_t dv_ind, uint32_t *numa_node) {
|
||||
TRY
|
||||
|
||||
+7
-1
@@ -95,7 +95,7 @@ static const char *kKFDPasidFName = "pasid";
|
||||
static const char *kKFDNodePropLOCATION_IDStr = "location_id";
|
||||
static const char *kKFDNodePropDOMAINStr = "domain";
|
||||
// static const char *kKFDNodePropDRM_RENDER_MINORStr = "drm_render_minor";
|
||||
// static const char *kKFDNodePropHIVE_IDStr = "hive_id";
|
||||
static const char *kKFDNodePropHIVE_IDStr = "hive_id";
|
||||
// static const char *kKFDNodePropNUM_SDMA_ENGINESStr = "num_sdma_engines";
|
||||
// static const char *kKFDNodePropNUM_SDMA_XGMI_ENGINESStr =
|
||||
// "num_sdma_xgmi_engines";
|
||||
@@ -560,6 +560,12 @@ KFDNode::Initialize(void) {
|
||||
|
||||
ret = ReadKFDGpuName(node_indx_, &name_);
|
||||
|
||||
ret = get_property_value(kKFDNodePropHIVE_IDStr, &xgmi_hive_id_);
|
||||
if (ret != 0) {
|
||||
throw amd::smi::rsmi_exception(RSMI_INITIALIZATION_ERROR,
|
||||
"Failed to initialize rocm_smi library (get xgmi hive id).");
|
||||
}
|
||||
|
||||
std::map<uint32_t, std::shared_ptr<IOLink>> io_link_map_tmp;
|
||||
ret = DiscoverIOLinksPerNode(node_indx_, &io_link_map_tmp);
|
||||
if (ret != 0) {
|
||||
|
||||
Reference in New Issue
Block a user