Skip to content

Commit 6f1a45d

Browse files
seanx92facebook-github-bot
authored andcommitted
remove unused function _get_unflattened_lengths (#2573)
Summary: Pull Request resolved: #2573 as title Reviewed By: PaulZhang12 Differential Revision: D66219413 fbshipit-source-id: 3df475b2f0fd5d5819c75fcbf8f5b84b5b45105a
1 parent c2f7d61 commit 6f1a45d

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

torchrec/modules/utils.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,6 @@ def _slice_1d_tensor(tensor: torch.Tensor, start: int, end: int) -> torch.Tensor
4848
return tensor[start:end]
4949

5050

51-
# PLEASE DO NOT USE THIS FUNCTION, THIS FUNCTION IS FOR BACKWARD COMPATIBILITY ONLY
52-
# USE THE ONE IN torchrec/quant/embedding_modules.py
53-
# TODO(@shuaoxiong): remove this function after we make sure all models switch to the new reference
54-
@torch.fx.wrap
55-
def _get_unflattened_lengths(lengths: torch.Tensor, num_features: int) -> torch.Tensor:
56-
"""
57-
Unflatten lengths tensor from [F * B] to [F, B].
58-
"""
59-
return lengths.view(num_features, -1)
60-
61-
6251
def extract_module_or_tensor_callable(
6352
module_or_callable: Union[
6453
Callable[[], torch.nn.Module],

0 commit comments

Comments
 (0)