bagua.torch_api.env

Module Contents

bagua.torch_api.env.get_default_bucket_size()

Get default communication bucket byte size.

Returns

The default bucket size.

Return type

int

bagua.torch_api.env.get_local_rank()

Get the rank of current node.

Local rank is a unique identifier assigned to each process within a node. They are always consecutive integers ranging from 0 to local_size.

Returns

The local rank of the node.

Return type

int

bagua.torch_api.env.get_local_size()

Get the number of processes in the node.

Returns

The local size of the node.

Return type

int

bagua.torch_api.env.get_rank()

Get the rank of current process group.

Rank is a unique identifier assigned to each process within a distributed process group. They are always consecutive integers ranging from 0 to world_size.

Returns

The rank of the process group.

Return type

int

bagua.torch_api.env.get_world_size()

Get the number of processes in the current process group.

Returns

The world size of the process group.

Return type

int