Skip to main content

Module device_selection

Module device_selection 

Source
Expand description

ibverbs-specific device selection: pairs a MemoryLocation with the RDMA NIC(s) that have the best PCIe path to it.

Enums§

IbvDeviceTarget
What an IbvConfig targets: a memory location (whose best NIC is auto-selected) or an explicit NIC by name.

Functions§

get_cuda_device_to_ibv_device
Process-wide CUDA ordinal → optimal NIC map, computed once per backend and cached. CPU-only workloads pay no initialization cost.
get_pci_address
The PCI address of an RDMA NIC, resolved from its sysfs device link (/sys/class/infiniband/<name>/device).
resolve_target
Resolves an IbvDeviceTarget to a single NIC of backend I: the named device for IbvDeviceTarget::Nic, or the best NIC for a memory location. Both arms are scoped to backend I, so a name belonging to a different backend resolves to None.
select_optimal_ibv_devices
The NIC(s) of backend I with the best path to location, ranked by PciPath::is_better_than (most local, then highest port-capped bandwidth) and returning all that tie for best.