class_docstr: Profile alpha and beta value for a given device list.
  
  Usage:
      # Note: the environment of execution is supposed to be
      # multi-process with multi-gpu in mpi style.
      >>> physical_devices = [0, 1, 4, 5]
      >>> ab_profiler = AlphaBetaProfiler(physical_devices)
      >>> ab_dict = profiler.alpha_beta_dict
      >>> print(ab_dict)
      {(0, 1): (1.9641406834125518e-05, 4.74049549614719e-12), (0, 4): (1.9506998360157013e-05, 6.97421973297474e-11), (0, 5): (2.293858677148819e-05, 7.129930361393644e-11),
       (1, 4): (1.9010603427886962e-05, 7.077968863788975e-11), (1, 5): (1.9807778298854827e-05, 6.928845708992215e-11), (4, 5): (1.8681809306144713e-05, 4.7522367291330524e-12),
       (1, 0): (1.9641406834125518e-05, 4.74049549614719e-12), (4, 0): (1.9506998360157013e-05, 6.97421973297474e-11), (5, 0): (2.293858677148819e-05, 7.129930361393644e-11),
       (4, 1): (1.9010603427886962e-05, 7.077968863788975e-11), (5, 1): (1.9807778298854827e-05, 6.928845708992215e-11), (5, 4): (1.8681809306144713e-05, 4.7522367291330524e-12)}
code: def _init_profiling(self):
      # Create process group list based on its global rank
      process_group_list = []
      for f_index in range(self.world_size - 1):
          for b_index in range(f_index + 1, self.world_size):
              process_group_list.append(
                  (
                      self.physical_devices[f_index],
                      self.physical_devices[b_index],
                  )
              )
  
      # Create process group dict which maps process group to its handler
      process_group_dict = {}
      for process_group in process_group_list:
          pg_handler = dist.new_group(process_group)
          process_group_dict[process_group] = pg_handler
  
      self.process_group_dict = process_group_dict
  
file_path: ColossalAI/colossalai/device/alpha_beta_profiler.py
imports: import math
  import time
  from typing import Dict, List, Tuple
  import torch
  import torch.distributed
  from colossalai.logging import get_dist_logger
label_desc: Use image node_id 2 for calling the AlphaBetaProfiler obj's underlying member method code with example usage: obj._init_profiling() without return types