Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error caused by all_reduce call in domino #6880

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
8 changes: 5 additions & 3 deletions deepspeed/runtime/domino/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import torch
import torch.nn.functional as F
from torch.nn.parameter import Parameter
import deepspeed
from deepspeed import comm as dist
import deepspeed.comm
from deepspeed.comm.comm import init_distributed
from deepspeed.accelerator import get_accelerator


def is_rank_0():
if dist.get_rank() == 0:
if deepspeed.comm.get_rank() == 0:
return True


Expand Down Expand Up @@ -249,6 +249,8 @@ def __init__(self,
output_bias=None):
super(DominoTransformerLayer, self).__init__()

init_distributed()
hwchen2017 marked this conversation as resolved.
Show resolved Hide resolved

self.llama_model = config.llama_model
self.layer_number = layer_number
self.layer_type = layer_type
Expand Down
Loading