class_docstr: This contains the data structures to track the execution order. We track
  the pre-forward order on the *first* iteration for forward prefetching
  (which thus assumes static graph) and the post-forward order on *every*
  iteration for backward prefetching (which thus does not assume static
  graph but may be provide an incorrect order).
docstr: Initializes the data structures needed for checking the forward order.
  This should be called after a root FSDP instance has been set during
  lazy initialization.
docstr_tok: ["Initializes","the","data","structures","needed","for","checking","the","forward","order",".","This","should","be","called","after","a","root","FSDP","instance","has","been","set","during","lazy","initialization","."]
code: def init(
      self,
      state: _FSDPState,
      root_module: nn.Module,
      process_group: dist.ProcessGroup,
  ) -> None:
      """
      Initializes the data structures needed for checking the forward order.
      This should be called after a root FSDP instance has been set during
      lazy initialization.
      """
      self.process_group = process_group
      self.rank = process_group.rank()
      self.world_size = process_group.size()
      # Fix an order over the handles, which should be the same across ranks
      for handle in traversal_utils._get_fsdp_handles(root_module):
          index = len(self.all_handles)
          self.all_handles.append(handle)
          handle._handle_index = index
      self.param_to_fqn = _get_param_to_fqns(root_module)
  
imports: import itertools
  import warnings
  from enum import auto, Enum
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  import torch.distributed
  import torch.distributed.fsdp._traversal_utils
  import torch.nn
  from torch.distributed.fsdp._common_utils import _FSDPState, _get_param_to_fqns
  from torch.distributed.fsdp._flat_param import FlatParamHandle
label_desc: Use image node_id 2 for calling the _ExecOrderData obj's underlying member method code with example usage: obj.init(state, root_module, process_group) without return types