code: def broadcast_model(model: torch.nn.Module):
      src_rank = gpc.get_ranks_in_group(ParallelMode.TENSOR)[0]
      for p in model.parameters():
          if (
              not getattr(p, IS_TENSOR_PARALLEL, False)
              and p.storage().size() > 0
          ):
              group = (
                  gpc.get_group(ParallelMode.TENSOR)
                  if p.device.type == "cuda"
                  else gpc.get_cpu_group(ParallelMode.TENSOR)
              )
              dist.broadcast(p, src_rank, group=group)
  
file_path: colossalai/colossalai/legacy/utils/checkpointing.py
imports: from collections import OrderedDict
  from itertools import chain
  import torch
  import torch.distributed
  from colossalai.legacy.constants import IS_TENSOR_PARALLEL
  from colossalai.legacy.context.parallel_mode import ParallelMode
  from colossalai.legacy.core import global_context
  from .common import is_using_pp
label_desc: Use image node_id 9 for calling a global function with example usage: broadcast_model(model) without return types