Skip to content
Merged
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
4 changes: 3 additions & 1 deletion deepspeed/module_inject/replace_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,9 @@ def _replace(child, name, conv_linear_layer):
weight_shape = child.weight.ds_shape
else:
weight_shape = child.weight.shape
if isinstance(all_reduce_linears, dict) and name in all_reduce_linears:
if (isinstance(all_reduce_linears,
tuple) or isinstance(all_reduce_linears,
str)) and name in all_reduce_linears:
new_weight = torch.empty((
weight_shape[1] if conv_linear_layer else weight_shape[0],
(weight_shape[0] if conv_linear_layer else weight_shape[1]) //
Expand Down