Skip to main content

Module device_selection

Module device_selection 

Source
Expand description

PCI topology parsing and device discovery utilities for RDMA device selection.

ibverbs-specific selection logic lives in crate::backend::ibverbs::device_selection.

Structs§

PCIAddress
A PCI address, e.g. 0000:07:00.0, as found under /sys/bus/pci/devices.
PciPath
A classified path between two PCI endpoints: its PathType and the bottleneck (minimum) PCIe link bandwidth along it, in MB/s.

Enums§

MemoryLocation
A source of memory for a transfer. A None index means “any device of this kind”: the location is then ranked against the best of all CPU nodes or all GPUs.
PathType
Locality of a path between two PCI endpoints, ordered best to worst. A path’s type is its worst (least local) segment.

Functions§

cpu_path
Path from CPU memory to the device at addr. With a specific NUMA node, the device is PathType::Phb when it sits on that node and PathType::Sys otherwise; with None (any CPU) it is judged against its own node and so is always PathType::Phb. Bandwidth is the device’s PCIe chain bottleneck.
get_cuda_pci_address
PCI address of the CUDA device with ordinal idx, read from /proc/driver/nvidia/gpus/*/information (the NVIDIA driver keys each GPU’s bus id there by its device minor, which equals the CUDA ordinal).
pci_path
The PathType and bottleneck bandwidth of the PCIe path between two PCI endpoints.