Add support to retrieve XGMI hive id

Change-Id: I1eee05dd85ecb856889d1cfe0565454d2f538856
Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>


[ROCm/amdsmi commit: 488bbb668a]
This commit is contained in:
Mike Li committed 2020-06-19 07:35:23 -07:00
1 parent 1309615850
commit 9375ef92fc
5 files changed
+68 -1

No files matched your search

@@ -2785,6 +2785,27 @@ rsmi_dev_xgmi_error_status(uint32_t dv_ind, rsmi_xgmi_status_t *status);
rsmi_status_t
rsmi_dev_xgmi_error_reset(uint32_t dv_ind);
/**
* @brief Retrieve the XGMI hive id for a device
*
* @details Given a device index @p dv_ind, and a pointer to an
* uint64_t @p hive_id, this function will write the current XGMI
* hive id for the device @p dv_ind to the memory pointed to by @p hive_id.
*
* @param[in] dv_ind a device index
*
* @param[inout] hive_id A pointer to an uint64_t to which the XGMI hive id
* should be written
*
* @retval ::RSMI_STATUS_SUCCESS call was successful
* @retval ::RSMI_STATUS_NOT_SUPPORTED installed software or hardware does not
* support this function with the given arguments
* @retval ::RSMI_STATUS_INVALID_ARGS the provided arguments are not valid
*
*/
rsmi_status_t
rsmi_dev_xgmi_hive_id_get(uint32_t dv_ind, uint64_t *hive_id);
/** @} */ // end of SysInfo
/*****************************************************************************/
@@ -69,6 +69,7 @@ class KFDNode {
uint32_t node_index(void) const {return node_indx_;}
uint32_t numa_node_number(void) const {return numa_node_number_;}
uint64_t numa_node_weight(void) const {return numa_node_weight_;}
uint64_t xgmi_hive_id(void) const {return xgmi_hive_id_;}
IO_LINK_TYPE numa_node_type(void) const {return numa_node_type_;}
int get_io_link_type(uint32_t node_to, IO_LINK_TYPE *type);
int get_io_link_weight(uint32_t node_to, uint64_t *weight);
@@ -84,6 +85,7 @@ class KFDNode {
uint32_t numa_node_number_;
uint64_t numa_node_weight_;
IO_LINK_TYPE numa_node_type_;
uint64_t xgmi_hive_id_;
std::map<uint32_t, IO_LINK_TYPE> io_link_type_;
std::map<uint32_t, uint64_t> io_link_weight_;
std::map<uint32_t, std::shared_ptr<IOLink>> io_link_map_;