Module device_selection

Module device_selection 

Source
Expand description

ibverbs-specific device selection logic that pairs compute devices with the best available RDMA NICs based on PCI topology distance.

Functions§

get_cuda_device_to_ibv_device
Returns a reference to the process-wide lazily-initialized Vec mapping CUDA device ordinal → optimal RDMA NIC (None if no NIC is mapped).
resolve_ibv_device
Resolves RDMA device using auto-detection logic when needed.
select_optimal_ibv_device
Step 1: Parse device string into prefix and postfix Step 2: Get PCI address from compute device Step 3: Get PCI address for all RDMA NIC devices Step 4: Calculate PCI distances and return closest RDMA NIC device