|
6 | 6 |
|
7 | 7 | import os |
8 | 8 | from collections.abc import Callable |
9 | | -from datetime import timedelta |
10 | 9 | from functools import cache, wraps |
11 | 10 | from typing import TYPE_CHECKING, TypeVar |
12 | 11 |
|
13 | 12 | import torch |
14 | | -from torch.distributed import PrefixStore, ProcessGroup |
15 | | -from torch.distributed.distributed_c10d import is_nccl_available |
16 | 13 | from typing_extensions import ParamSpec |
17 | 14 |
|
18 | 15 | # import custom ops, trigger op registration |
@@ -455,37 +452,6 @@ def opaque_attention_op(cls) -> bool: |
455 | 452 | def get_static_graph_wrapper_cls(cls) -> str: |
456 | 453 | return "vllm.compilation.cuda_graph.CUDAGraphWrapper" |
457 | 454 |
|
458 | | - @classmethod |
459 | | - def stateless_init_device_torch_dist_pg( |
460 | | - cls, |
461 | | - backend: str, |
462 | | - prefix_store: PrefixStore, |
463 | | - group_rank: int, |
464 | | - group_size: int, |
465 | | - timeout: timedelta, |
466 | | - ) -> ProcessGroup: |
467 | | - assert is_nccl_available() |
468 | | - pg: ProcessGroup = ProcessGroup( |
469 | | - prefix_store, |
470 | | - group_rank, |
471 | | - group_size, |
472 | | - ) |
473 | | - from torch.distributed.distributed_c10d import ProcessGroupNCCL |
474 | | - |
475 | | - backend_options = ProcessGroupNCCL.Options() |
476 | | - backend_options._timeout = timeout |
477 | | - |
478 | | - backend_class = ProcessGroupNCCL( |
479 | | - prefix_store, group_rank, group_size, backend_options |
480 | | - ) |
481 | | - backend_type = ProcessGroup.BackendType.NCCL |
482 | | - device = torch.device("cuda") |
483 | | - pg._set_default_backend(backend_type) |
484 | | - backend_class._set_sequence_number_for_group() |
485 | | - |
486 | | - pg._register_backend(device, backend_type, backend_class) |
487 | | - return pg |
488 | | - |
489 | 455 | @classmethod |
490 | 456 | def device_count(cls) -> int: |
491 | 457 | return cuda_device_count_stateless() |
|
0 commit comments