Skip to content
Merged
2 changes: 1 addition & 1 deletion deepspeed/module_inject/replace_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ 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) 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