Check if model and data parallel groups are initialized.
()
| 182 | |
| 183 | |
| 184 | def model_parallel_is_initialized(): |
| 185 | """Check if model and data parallel groups are initialized.""" |
| 186 | if ( |
| 187 | _TENSOR_MODEL_PARALLEL_GROUP is None |
| 188 | or _PIPELINE_MODEL_PARALLEL_GROUP is None |
| 189 | or _DATA_PARALLEL_GROUP is None |
| 190 | ): |
| 191 | return False |
| 192 | return True |
| 193 | |
| 194 | |
| 195 | def get_model_parallel_group(): |
nothing calls this directly
no outgoing calls
no test coverage detected