mirror of
https://github.com/deepseek-ai/DeepEP
synced 2025-06-26 18:28:11 +00:00
Move import.
This commit is contained in:
parent
bf4a4a21d2
commit
cd371d31fc
@ -4,6 +4,7 @@ import numpy as np
|
|||||||
import torch
|
import torch
|
||||||
import torch.distributed as dist
|
import torch.distributed as dist
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
import inspect
|
||||||
|
|
||||||
|
|
||||||
def init_dist(local_rank: int, num_local_ranks: int):
|
def init_dist(local_rank: int, num_local_ranks: int):
|
||||||
@ -14,7 +15,6 @@ def init_dist(local_rank: int, num_local_ranks: int):
|
|||||||
node_rank = int(os.getenv('RANK', 0))
|
node_rank = int(os.getenv('RANK', 0))
|
||||||
assert (num_local_ranks < 8 and num_nodes == 1) or num_local_ranks == 8
|
assert (num_local_ranks < 8 and num_nodes == 1) or num_local_ranks == 8
|
||||||
|
|
||||||
import inspect
|
|
||||||
sig = inspect.signature(dist.init_process_group)
|
sig = inspect.signature(dist.init_process_group)
|
||||||
params = {
|
params = {
|
||||||
'backend': 'nccl',
|
'backend': 'nccl',
|
||||||
|
Loading…
Reference in New Issue
Block a user