class_docstr: A Static Memory statistic collector.
class_docstr_tok: ["A","Static","Memory","statistic","collector","."]
code: def register_opnodes_recursively(
      self,
      module: torch.nn.Module,
      name: str = "",
      full_name: str = "",
      parent_module: Optional[torch.nn.Module] = None,
  ):
      assert isinstance(module, torch.nn.Module)
  
      for child_name, child in module.named_children():
          self.register_opnodes_recursively(
              child, child_name, full_name + "_" + child_name, module
          )
  
      # Early return on modules with no parameters.
      if len(list(module.parameters(recurse=False))) == 0:
          return
  
      self.module_info_list.append(
          ModuleInfos(module, name, full_name[1:], parent_module)
      )
  
file_path: colossalai/colossalai/zero/gemini/memory_tracer/static_memstats_collector.py
imports: from typing import Optional
  import torch
  import torch.nn
  from torch.fx import symbolic_trace
  from colossalai.fx.passes.meta_info_prop import MetaInfoProp
  from colossalai.fx.profiler import calculate_fwd_out, calculate_fwd_tmp, is_compatible_with_meta
  from colossalai.zero.gemini.chunk import ChunkManager
  from .chunk_memstats_collector import ChunkMemStatsCollector
label_desc: Use image node_id 5 for calling the StaticMemStatsCollector obj's underlying member method code with example usage: obj.register_opnodes_recursively(module, name, full_name, parent_module) without return types