Skip to content

Commit b594741

Browse files
committed
Update on "[FSDP] Allow to use TorchDispatch with FSDP"
Add `_no_dispatch_record_stream` to disable TorchDispatch before calling `record_stream()`. [ghstack-poisoned]
2 parents e481089 + e04e929 commit b594741

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

torch/distributed/fsdp/_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
_is_namedtuple,
1010
)
1111
from torch.nn.utils.rnn import PackedSequence
12+
from torch.utils._mode_utils import no_dispatch
1213

1314

1415
def _contains_batchnorm(module):

0 commit comments

Comments
 (0)