bagua.torch_api.env

Module Contents

bagua.torch_api.env.find_free_network_port()

Finds a free port on localhost.

Return type:

int

bagua.torch_api.env.get_autotune_server_wait_time()
Return type:

int

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_node_rank()

Get the rank among all nodes.

Returns:

The node rank of the node.

Return type:

int

bagua.torch_api.env.get_rank()

Get the rank of the default process group.

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

Returns:

The rank of the default process group.

Return type:

int

bagua.torch_api.env.get_world_size()

Get the number of processes in the default process group.

Returns:

The world size of the default process group.

Return type:

int