Skip to content

Commit

Permalink
Avoid partitioning small activations (#1154)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjruwase authored Jun 18, 2021
1 parent 1ba3e8e commit b1669c0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ def save_args_for_backward(*all_args):

inputs = []
for i, item in enumerate(args[:-1]):
if not torch.is_tensor(item):
if not torch.is_tensor(item) or mp_size > item.numel():
inputs.append(item)
continue

Expand Down

0 comments on commit b1669c0

Please sign in to comment.