Unverified Commit 6f18e779 authored by Yanli Zhao's avatar Yanli Zhao Committed by GitHub
Browse files

[FSDP] Add FairScale FSDP adoptions logging (#913)

* Add FairScale FSDP adoptions logging

* Add FairScale FSDP adoptions logging
parent fef44233
...@@ -207,7 +207,7 @@ class SsdTensorHandle(torch.Tensor): ...@@ -207,7 +207,7 @@ class SsdTensorHandle(torch.Tensor):
else: else:
read(tensor, self.filename, self.offset * tensor.element_size()) read(tensor, self.filename, self.offset * tensor.element_size())
__torch_function__ = torch._C._disabled_torch_function_impl # type: ignore __torch_function__ = torch._C._disabled_torch_function_impl
@classmethod @classmethod
def __torch_dispatch__(cls, func, types, args=(), kwargs=None): # type: ignore def __torch_dispatch__(cls, func, types, args=(), kwargs=None): # type: ignore
......
...@@ -321,6 +321,13 @@ class FullyShardedDataParallel(nn.Module): ...@@ -321,6 +321,13 @@ class FullyShardedDataParallel(nn.Module):
offload_config: Optional[OffloadConfig] = None, offload_config: Optional[OffloadConfig] = None,
state_dict_on_rank_0_only: bool = False, state_dict_on_rank_0_only: bool = False,
): ):
try:
import torch._C
torch._C._log_api_usage_once("fairscale.fsdp")
except ImportError:
pass
init_start = time.time() init_start = time.time()
super().__init__() super().__init__()
self.process_group = process_group or get_process_group_cached() self.process_group = process_group or get_process_group_cached()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment