Skip to content
Closed
Show file tree
Hide file tree
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
5 changes: 1 addition & 4 deletions torchrec/distributed/embeddingbag.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,7 @@ def __init__(
if env.process_group and dist.get_backend(env.process_group) != "fake":
self._initialize_torch_state()

if module.device not in ["meta", "cpu"] and module.device.type not in [
"meta",
"cpu",
]:
if module.device != "meta" and module.device.type != "meta":
self.load_state_dict(module.state_dict(), strict=False)

@classmethod
Expand Down
4 changes: 2 additions & 2 deletions torchrec/distributed/planner/tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ def _test_hashing_consistency(


class TestConsistentHashingBetweenProcesses(MultiProcessTestBase):

def test_hash_consistency(self) -> None:
# the proposal order might vary in github action so skip this test
def test_hash_consistency_disabled_in_oss_compatibility(self) -> None:
# planner
world_size = 2
return_hash_dict = multiprocessing.Manager().dict()
Expand Down
2 changes: 1 addition & 1 deletion torchrec/distributed/tests/test_init_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def test_initialize_parameters_ec(
device=st.sampled_from(
[
torch.device("cuda"),
# torch.device("cpu"),
torch.device("cpu"),
]
),
)
Expand Down
Loading