Hardware Topology Functions#
Functions | |
rsmi_status_t | rsmi_topo_get_numa_node_number (uint32_t dv_ind, uint32_t *numa_node) |
Retrieve the NUMA CPU node number for a device. More... | |
rsmi_status_t | rsmi_topo_get_link_weight (uint32_t dv_ind_src, uint32_t dv_ind_dst, uint64_t *weight) |
Retrieve the weight for a connection between 2 GPUs. More... | |
rsmi_status_t | rsmi_minmax_bandwidth_get (uint32_t dv_ind_src, uint32_t dv_ind_dst, uint64_t *min_bandwidth, uint64_t *max_bandwidth) |
Retreive minimal and maximal io link bandwidth between 2 GPUs. More... | |
rsmi_status_t | rsmi_topo_get_link_type (uint32_t dv_ind_src, uint32_t dv_ind_dst, uint64_t *hops, RSMI_IO_LINK_TYPE *type) |
Retrieve the hops and the connection type between 2 GPUs. More... | |
rsmi_status_t | rsmi_is_P2P_accessible (uint32_t dv_ind_src, uint32_t dv_ind_dst, bool *accessible) |
Return P2P availability status between 2 GPUs. More... | |
Detailed Description
These functions are used to query Hardware topology.
Function Documentation
◆ rsmi_topo_get_numa_node_number()
rsmi_status_t rsmi_topo_get_numa_node_number | ( | uint32_t | dv_ind, |
uint32_t * | numa_node | ||
) |
Retrieve the NUMA CPU node number for a device.
Given a device index dv_ind
, and a pointer to an uint32_t numa_node
, this function will write the node number of NUMA CPU for the device dv_ind
to the memory pointed to by numa_node
.
- Parameters
-
[in] dv_ind a device index [in,out] numa_node A pointer to an uint32_t to which the numa node number should be written.
- Return values
-
RSMI_STATUS_SUCCESS call was successful RSMI_STATUS_INVALID_ARGS the provided arguments are not valid
◆ rsmi_topo_get_link_weight()
rsmi_status_t rsmi_topo_get_link_weight | ( | uint32_t | dv_ind_src, |
uint32_t | dv_ind_dst, | ||
uint64_t * | weight | ||
) |
Retrieve the weight for a connection between 2 GPUs.
Given a source device index dv_ind_src
and a destination device index dv_ind_dst
, and a pointer to an uint64_t weight
, this function will write the weight for the connection between the device dv_ind_src
and dv_ind_dst
to the memory pointed to by weight
.
- Parameters
-
[in] dv_ind_src the source device index [in] dv_ind_dst the destination device index [in,out] weight A pointer to an uint64_t to which the weight for the connection should be written.
- Return values
-
RSMI_STATUS_SUCCESS call was successful RSMI_STATUS_INVALID_ARGS the provided arguments are not valid
◆ rsmi_minmax_bandwidth_get()
rsmi_status_t rsmi_minmax_bandwidth_get | ( | uint32_t | dv_ind_src, |
uint32_t | dv_ind_dst, | ||
uint64_t * | min_bandwidth, | ||
uint64_t * | max_bandwidth | ||
) |
Retreive minimal and maximal io link bandwidth between 2 GPUs.
Given a source device index dv_ind_src
and a destination device index dv_ind_dst
, pointer to an uint64_t min_bandwidth
, and a pointer to uint64_t max_bandiwidth
, this function will write theoretical minimal and maximal bandwidth limits. API works if src and dst are connected via xgmi and have 1 hop distance.
- Parameters
-
[in] dv_ind_src the source device index [in] dv_ind_dst the destination device index [in,out] min_bandwidth A pointer to an uint64_t to which the minimal bandwidth for the connection should be written. [in,out] max_bandwidth A pointer to an uint64_t to which the maximal bandwidth for the connection should be written.
- Return values
-
RSMI_STATUS_SUCCESS call was successful RSMI_STATUS_INVALID_ARGS the provided arguments are not valid
◆ rsmi_topo_get_link_type()
rsmi_status_t rsmi_topo_get_link_type | ( | uint32_t | dv_ind_src, |
uint32_t | dv_ind_dst, | ||
uint64_t * | hops, | ||
RSMI_IO_LINK_TYPE * | type | ||
) |
Retrieve the hops and the connection type between 2 GPUs.
Given a source device index dv_ind_src
and a destination device index dv_ind_dst
, and a pointer to an uint64_t hops
and a pointer to an RSMI_IO_LINK_TYPE type
, this function will write the number of hops and the connection type between the device dv_ind_src
and dv_ind_dst
to the memory pointed to by hops
and type
.
- Parameters
-
[in] dv_ind_src the source device index [in] dv_ind_dst the destination device index [in,out] hops A pointer to an uint64_t to which the hops for the connection should be written. [in,out] type A pointer to an RSMI_IO_LINK_TYPE to which the type for the connection should be written.
- Return values
-
RSMI_STATUS_SUCCESS call was successful RSMI_STATUS_INVALID_ARGS the provided arguments are not valid
◆ rsmi_is_P2P_accessible()
rsmi_status_t rsmi_is_P2P_accessible | ( | uint32_t | dv_ind_src, |
uint32_t | dv_ind_dst, | ||
bool * | accessible | ||
) |
Return P2P availability status between 2 GPUs.
Given a source device index dv_ind_src
and a destination device index dv_ind_dst
, and a pointer to a bool @accessible, this function will write the P2P connection status between the device dv_ind_src
and dv_ind_dst
to the memory pointed to by accessible
.
- Parameters
-
[in] dv_ind_src the source device index [in] dv_ind_dst the destination device index [in,out] accessible A pointer to a bool to which the status for the P2P connection availablity should be written.
- Return values
-
RSMI_STATUS_SUCCESS call was successful RSMI_STATUS_INVALID_ARGS the provided arguments are not valid