def is_pipeline_stage_at_split():
    """Return true if pipeline stage executes decoder block and next
    stage executes encoder block for a model with both encoder and
    decoder."""
    rank = get_pipeline_model_parallel_rank()
    return is_pipeline_stage_before_split(rank) and is_pipeline_stage_after_split(rank + 1)
Return true if pipeline stage executes decoder block and next
    stage executes encoder block for a model with both encoder and
    decoder.
training/DeepSpeed-Domino/megatron/core/parallel_state.py