MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / get_tensor_model_parallel_rank

Function get_tensor_model_parallel_rank

codegeex/megatron/mpu/initialize.py:276–281  ·  view source on GitHub ↗

Return my rank for the tensor model parallel group.

()

Source from the content-addressed store, hash-verified

274
275
276def get_tensor_model_parallel_rank():
277 """Return my rank for the tensor model parallel group."""
278 global _MPU_TENSOR_MODEL_PARALLEL_RANK
279 if _MPU_TENSOR_MODEL_PARALLEL_RANK is not None:
280 return _MPU_TENSOR_MODEL_PARALLEL_RANK
281 return torch.distributed.get_rank(group=get_tensor_model_parallel_group())
282
283
284def get_model_parallel_rank():

Callers 11

__init__Method · 0.85
forwardMethod · 0.85
broadcast_dataFunction · 0.85
get_model_parallel_rankFunction · 0.85
_splitFunction · 0.85
_gatherFunction · 0.85

Calls 1

Tested by

no test coverage detected