def is_rank_in_position_embedding_group():
    """Return true if current rank is in position embedding group, False otherwise."""
    rank = torch.distributed.get_rank()
    global _POSITION_EMBEDDING_GLOBAL_RANKS
    return rank in _POSITION_EMBEDDING_GLOBAL_RANKS
Return true if current rank is in position embedding group, False otherwise.
training/DeepSpeed-Domino/megatron/core/parallel_state.py