Skip to content

Commit 03c3a72

Browse files
Ivan Kobzarevfacebook-github-bot
authored andcommitted
Remove comm_ops import to workaround torch package issues of lego (#2161)
Summary: Pull Request resolved: #2161 Pyper release fails because of torch package issues of comm_ops (torch package of transform uses old-old version without set_use_sync_collectives). PT2Pipeline is not used in prod. Reviewed By: gnahzg Differential Revision: D58947470 fbshipit-source-id: 68bea8a1066616f8a53a0ca6a550d9d3008f3028
1 parent 3eff5ce commit 03c3a72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchrec/distributed/train_pipeline/train_pipelines.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
import torch
3030
from torch.autograd.profiler import record_function
31-
from torchrec.distributed.comm_ops import set_use_sync_collectives
3231
from torchrec.distributed.dist_data import KJTAllToAllTensorsAwaitable
3332
from torchrec.distributed.model_parallel import ShardedModule
3433
from torchrec.distributed.train_pipeline.utils import (
@@ -212,7 +211,8 @@ def progress(self, dataloader_iter: Iterator[In]) -> Out:
212211
if self._iter == 0:
213212
# Turn on sync collectives for PT2 pipeline.
214213
# To have similar logic between compiled/graph_break ranks.
215-
set_use_sync_collectives(True)
214+
# TODO(ivankobzarev): Call torchrec.distributed.comm_ops.set_use_sync_collectives(True) when torch package issue on import of comm_ops is fixed
215+
pass
216216

217217
cc = self._compile_configs
218218

0 commit comments

Comments
 (0)