[Feat] Add support for per GPU worker RDMA NIC selection (#42083)
Signed-off-by: Raj Joshi <rajjoshi@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -381,6 +381,19 @@ class Platform:
|
||||
"""Get the total memory of a device in bytes."""
|
||||
raise NotImplementedError
|
||||
|
||||
@classmethod
|
||||
def get_all_gpu_pci_bus_ids(cls) -> dict[int, str]:
|
||||
"""Return a mapping of device index to PCI bus ID string.
|
||||
|
||||
Used by ``VLLM_GPU_NIC_PCIE_MAPPING`` for RDMA NIC selection.
|
||||
Subclasses should override with platform-specific discovery
|
||||
(e.g. pynvml for CUDA).
|
||||
"""
|
||||
raise NotImplementedError(
|
||||
"VLLM_GPU_NIC_PCIE_MAPPING is not supported on the "
|
||||
f"current platform ({cls.device_name})"
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def inference_mode(cls):
|
||||
"""A device-specific wrapper of `torch.inference_mode`.
|
||||
|
||||
Reference in New Issue
Block a user