Skip to content

Commit

Permalink
Revert D66465376
Browse files Browse the repository at this point in the history
Summary:
This diff reverts D66465376
seems causing NCCL error and regressing peak mem for a TorchBench test

Reviewed By: TroyGarden

Differential Revision: D66794877
  • Loading branch information
Dark Knight authored and facebook-github-bot committed Dec 5, 2024
1 parent 79111fb commit 2b5db3f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 28 deletions.
8 changes: 0 additions & 8 deletions torchrec/distributed/embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,6 @@
except OSError:
pass

try:
from tensordict import TensorDict
except ImportError:

class TensorDict:
pass


logger: logging.Logger = logging.getLogger(__name__)


Expand Down
7 changes: 0 additions & 7 deletions torchrec/distributed/embeddingbag.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,6 @@
except OSError:
pass

try:
from tensordict import TensorDict
except ImportError:

class TensorDict:
pass


def _pin_and_move(tensor: torch.Tensor, device: torch.device) -> torch.Tensor:
return (
Expand Down
8 changes: 0 additions & 8 deletions torchrec/modules/embedding_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@
from torchrec.sparse.jagged_tensor import JaggedTensor, KeyedJaggedTensor, KeyedTensor


try:
from tensordict import TensorDict
except ImportError:

class TensorDict:
pass


@torch.fx.wrap
def reorder_inverse_indices(
inverse_indices: Optional[Tuple[List[str], torch.Tensor]],
Expand Down
7 changes: 2 additions & 5 deletions torchrec/sparse/jagged_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,9 @@

# OSS
try:
from tensordict import TensorDict
pass
except ImportError:

class TensorDict:
pass

pass

logger: logging.Logger = logging.getLogger()

Expand Down

0 comments on commit 2b5db3f

Please sign in to comment.