Topology#
- group Topology
Functions
- dcgmReturn_t dcgmGetDeviceTopology(
- dcgmHandle_t pDcgmHandle,
- unsigned int gpuId,
- dcgmDeviceTopology_v2 *pDcgmDeviceTopology
Gets device topology corresponding to the gpuId.
- Parameters:
pDcgmHandle – IN: DCGM Handle
gpuId – IN: GPU Id corresponding to which topology information should be fetched
pDcgmDeviceTopology – IN/OUT: Topology information corresponding to gpuId. pDcgmDeviceTopology->version must be set to dcgmDeviceTopology_version or dcgmDeviceTopology_version1 before this call.
- Returns:
DCGM_ST_OK if the call was successful.
DCGM_ST_BADPARAM if gpuId or pDcgmDeviceTopology were not valid.
DCGM_ST_VER_MISMATCH if pDcgmDeviceTopology->version was not set to a supported version.
- dcgmReturn_t dcgmGetGroupTopology(
- dcgmHandle_t pDcgmHandle,
- dcgmGpuGrp_t groupId,
- dcgmGroupTopology_v2 *pDcgmGroupTopology
Gets group topology corresponding to the groupId.
- Parameters:
pDcgmHandle – IN: DCGM Handle
groupId – IN: GroupId corresponding to which topology information should be fetched
pDcgmGroupTopology – IN/OUT: Topology information corresponding to groupId. pDcgmgroupTopology->version must be set to dcgmGroupTopology_version or dcgmGroupTopology_version1.
- Returns:
DCGM_ST_OK if the call was successful.
DCGM_ST_BADPARAM if groupId or pDcgmGroupTopology were not valid.
DCGM_ST_VER_MISMATCH if pDcgmgroupTopology->version was not set to a supported version.
- dcgmReturn_t dcgmSelectGpusByTopology(
- dcgmHandle_t pDcgmHandle,
- uint64_t inputGpuIds,
- uint32_t numGpus,
- uint64_t *outputGpuIds,
- uint64_t hintFlags
Get the best group of gpus from the specified bitmask according to topological proximity: cpuAffinity, NUMA node, and NVLink.
- Parameters:
pDcgmHandle – IN: DCGM Handle
inputGpuIds – IN: a bitmask of which GPUs DCGM should consider. If some of the GPUs on the system are already in use, they shouldn’t be included in the bitmask. 0 means that all of the GPUs in the system should be considered.
numGpus – IN: the number of GPUs that are desired from inputGpuIds. If this number is greater than the number of healthy GPUs in inputGpuIds, then less than numGpus gpus will be specified in outputGpuIds.
outputGpuIds – OUT: a bitmask of numGpus or fewer GPUs from inputGpuIds that represent the best placement available from inputGpuIds.
hintFlags – IN: a bitmask of DCGM_TOPO_HINT_F_ #defines of hints that should be taken into account when assigning outputGpuIds.
- Returns:
DCGM_ST_OK if the call was successful