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
8 changes: 1 addition & 7 deletions deepspeed/module_inject/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@

# DeepSpeed Team

import torch
from deepspeed.utils import log_dist


def transpose(data):
with torch.no_grad():
data = data.contiguous()
data1 = data.transpose(-1, -2).reshape(-1)
data.reshape(-1).copy_(data1)
data1 = None
return data.reshape(data.shape[-1], data.shape[-2])
return data.transpose(-1, -2).contiguous()
Comment thread
sfc-gh-truwase marked this conversation as resolved.


# helper function to map between DS policies and DS containers
Expand Down
Loading