torchfoo.distributed.get_rank#

torchfoo.distributed.get_rank()[source]#

Get rank of the current distributed process

Returns:

Rank of the current process, or 0 if not in distributed mode.

Return type:

int