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
3 changes: 2 additions & 1 deletion deepspeed/module_inject/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def move(tensor, device):
# to save host resources when DP > 1。

if tensor.is_meta:
return torch.empty_like(tensor, device=device)
# Keep tensor in meta device if tensor is meta.
Comment thread
tjruwase marked this conversation as resolved.
return tensor
else:
# Using new tensors help in freeing memory (after split for example) was done before by calling clone().
# Using copy=True instead of clone() will help in case of cpu --> cpu.
Expand Down