Hardware Topology Functions#
Functions | |
amdsmi_status_t | amdsmi_topo_get_numa_node_number (amdsmi_device_handle device_handle, uint32_t *numa_node) |
Retrieve the NUMA CPU node number for a device. More... | |
amdsmi_status_t | amdsmi_topo_get_link_weight (amdsmi_device_handle device_handle_src, amdsmi_device_handle device_handle_dst, uint64_t *weight) |
Retrieve the weight for a connection between 2 GPUs. More... | |
amdsmi_status_t | amdsmi_get_minmax_bandwidth (amdsmi_device_handle device_handle_src, amdsmi_device_handle device_handle_dst, uint64_t *min_bandwidth, uint64_t *max_bandwidth) |
Retreive minimal and maximal io link bandwidth between 2 GPUs. More... | |
amdsmi_status_t | amdsmi_topo_get_link_type (amdsmi_device_handle device_handle_src, amdsmi_device_handle device_handle_dst, uint64_t *hops, AMDSMI_IO_LINK_TYPE *type) |
Retrieve the hops and the connection type between 2 GPUs. More... | |
amdsmi_status_t | amdsmi_is_P2P_accessible (amdsmi_device_handle device_handle_src, amdsmi_device_handle device_handle_dst, bool *accessible) |
Return P2P availability status between 2 GPUs. More... | |
Detailed Description
These functions are used to query Hardware topology.
Function Documentation
◆ amdsmi_topo_get_numa_node_number()
amdsmi_status_t amdsmi_topo_get_numa_node_number | ( | amdsmi_device_handle | device_handle, |
uint32_t * | numa_node | ||
) |
Retrieve the NUMA CPU node number for a device.
Given a device handle device_handle
, and a pointer to an uint32_t numa_node
, this function will write the node number of NUMA CPU for the device device_handle
to the memory pointed to by numa_node
.
- Parameters
-
[in] device_handle a device handle [in,out] numa_node A pointer to an uint32_t to which the numa node number should be written.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_topo_get_link_weight()
amdsmi_status_t amdsmi_topo_get_link_weight | ( | amdsmi_device_handle | device_handle_src, |
amdsmi_device_handle | device_handle_dst, | ||
uint64_t * | weight | ||
) |
Retrieve the weight for a connection between 2 GPUs.
Given a source device handle device_handle_src
and a destination device handle device_handle_dst
, and a pointer to an uint64_t weight
, this function will write the weight for the connection between the device device_handle_src
and device_handle_dst
to the memory pointed to by weight
.
- Parameters
-
[in] device_handle_src the source device handle [in] device_handle_dst the destination device handle [in,out] weight A pointer to an uint64_t to which the weight for the connection should be written.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_get_minmax_bandwidth()
amdsmi_status_t amdsmi_get_minmax_bandwidth | ( | amdsmi_device_handle | device_handle_src, |
amdsmi_device_handle | device_handle_dst, | ||
uint64_t * | min_bandwidth, | ||
uint64_t * | max_bandwidth | ||
) |
Retreive minimal and maximal io link bandwidth between 2 GPUs.
Given a source device handle device_handle_src
and a destination device handle device_handle_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] device_handle_src the source device handle [in] device_handle_dst the destination device handle [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.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_topo_get_link_type()
amdsmi_status_t amdsmi_topo_get_link_type | ( | amdsmi_device_handle | device_handle_src, |
amdsmi_device_handle | device_handle_dst, | ||
uint64_t * | hops, | ||
AMDSMI_IO_LINK_TYPE * | type | ||
) |
Retrieve the hops and the connection type between 2 GPUs.
Given a source device handle device_handle_src
and a destination device handle device_handle_dst
, and a pointer to an uint64_t hops
and a pointer to an AMDSMI_IO_LINK_TYPE type
, this function will write the number of hops and the connection type between the device device_handle_src
and device_handle_dst
to the memory pointed to by hops
and type
.
- Parameters
-
[in] device_handle_src the source device handle [in] device_handle_dst the destination device handle [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 AMDSMI_IO_LINK_TYPE to which the type for the connection should be written.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_is_P2P_accessible()
amdsmi_status_t amdsmi_is_P2P_accessible | ( | amdsmi_device_handle | device_handle_src, |
amdsmi_device_handle | device_handle_dst, | ||
bool * | accessible | ||
) |
Return P2P availability status between 2 GPUs.
Given a source device handle device_handle_src
and a destination device handle device_handle_dst
, and a pointer to a bool accessible
, this function will write the P2P connection status between the device device_handle_src
and device_handle_dst
to the memory pointed to by accessible
.
- Parameters
-
[in] device_handle_src the source device handle [in] device_handle_dst the destination device handle [in,out] accessible A pointer to a bool to which the status for the P2P connection availablity should be written.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail