pub fn resolve_target<I: IbvDeviceImpl>(
target: &IbvDeviceTarget,
) -> Result<Option<IbvDeviceInfo>>Expand description
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 Ok(None).
Where several NICs tie for a memory location, this takes the first, which by
select_optimal_ibv_devices’s ordering is the lexicographically smallest
name. Two processes pinning the same location over the same NICs therefore
resolve to the same device.
Ok(None) means “no such device”; an error means the target could not be
evaluated at all, which for a GPU location includes CUDA not being
initialized in this process.