Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deepspeed/comm/ccl.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def get_all_ranks_from_group(self, group):
while True:
results.append(super(CCLBackend, self).get_global_rank(group, rank))
rank += 1
except ValueError:
except (ValueError, RuntimeError):
pass
if tuple(results) not in self.groups:
self._new_group(results, group)
Expand Down
2 changes: 1 addition & 1 deletion deepspeed/runtime/pipe/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ def _exec_send_grads(self, buffer_id):
if isinstance(inputs, tuple):
first_input = inputs[0]
assert all([torch.is_tensor(elt) for elt in inputs[1:]])
inputs_grad_tail = [elt.grad for elt in inputs[1:] if elt.grad is not None]
inputs_grad_tail = [elt.grad for elt in inputs[1:]]
elif torch.is_tensor(inputs):
first_input = inputs
inputs_grad_tail = []
Expand Down
3 changes: 3 additions & 0 deletions op_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ def jit_load(self, verbose=True):
cxx_args.append("-DBF16_AVAILABLE")
nvcc_args.append("-DBF16_AVAILABLE")

if self.is_rocm_pytorch():
cxx_args.append("-D__HIP_PLATFORM_AMD__=1")

op_module = load(name=self.name,
sources=self.strip_empty_entries(sources),
extra_include_paths=self.strip_empty_entries(extra_include_paths),
Expand Down
2 changes: 1 addition & 1 deletion op_builder/evoformer_attn.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def extra_ldflags(self):

def sources(self):
src_dir = 'csrc/deepspeed4science/evoformer_attn'
return [f'{src_dir}/attention.cpp', f'{src_dir}/attention_back.cu', f'{src_dir}/attention.cu']
return [f'{src_dir}/attention.cpp', f'{src_dir}/attention_back.cu', f'{src_dir}/attention_cu.cu']

def nvcc_args(self):
args = super().nvcc_args()
Expand Down