def get_data_parallel_group():
    """Get the data parallel group the caller rank belongs to."""
    assert _DATA_PARALLEL_GROUP is not None, \
        'data parallel group is not initialized'
    return _DATA_PARALLEL_GROUP
Get the data parallel group the caller rank belongs to.
megatron_lm/megatron/mpu/initialize.py