Skip to content

Commit 993d524

Browse files
JKSenthilfacebook-github-bot
authored andcommitted
fix broken torch imports
Reviewed By: diego-urgell Differential Revision: D62662370 fbshipit-source-id: 7a86367ac692a0b81e4bc5fd81d2b917c7660ee6
1 parent d68b3ec commit 993d524

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/gpu_tests/test_snapshot_dtensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
import torch
1515
from torch import distributed as dist, nn
16+
from torch.distributed import init_device_mesh
1617
from torch.distributed._tensor import DeviceMesh
17-
from torch.distributed._tensor.device_mesh import init_device_mesh
1818
from torch.distributed.fsdp import (
1919
FullyShardedDataParallel as FSDP,
2020
ShardingStrategy,

torchsnapshot/io_preparers/dtensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
)
3333

3434
try:
35-
from torch.distributed._tensor._utils import compute_local_shape_and_global_offset
35+
from torch.distributed.tensor._utils import compute_local_shape_and_global_offset
3636

3737
except ImportError:
3838

0 commit comments

Comments
 (0)