get_global_rank (original) (raw)
Toggle table of contents sidebar
composer.utils.dist.get_global_rank(group=None)[source]#
Returns the global rank of the current process in the input PG, which is on [0; group.WORLD_SIZE - 1]
.
Parameters
group (ProcessGroup , optional) – The process group. If None
, it will return env_var RANK
Returns
int – The global rank in input process group.