code: def gather_split_1d_tensor(tensor):
      """Opposite of above function, gather values from model parallel ranks."""
      world_size = parallel_state.get_tensor_model_parallel_world_size()
      numel = torch.numel(tensor)
      numel_gathered = world_size * numel
      gathered = torch.empty(
          numel_gathered,
          dtype=tensor.dtype,
          device=torch.cuda.current_device(),
          requires_grad=False,
      )
      torch.distributed.all_gather_into_tensor(
          gathered,
          tensor,
          group=parallel_state.get_tensor_model_parallel_group(),
      )
      return gathered
  
imports: import torch
  from apex.transformer import parallel_state
label_desc: Use image node_id 4 for calling a global function with example usage: gather_split_1d_tensor(tensor) and returns: gathered