dgl.distributed.initialize๏
- dgl.distributed.initialize(ip_config, max_queue_size=21474836480, net_type=None, num_worker_threads=1, use_graphbolt=False)[source]๏
Initialize DGLโs distributed module
This function initializes DGLโs distributed module. It acts differently in server or client modes. In the server mode, it runs the server code and never returns. In the client mode, it builds connections with servers for communication and creates worker processes for distributed sampling.
- Parameters:
ip_config (str) โ File path of ip_config file
max_queue_size (int) โ
Maximal size (bytes) of client queue buffer (~20 GB on default).
Note that the 20 GB is just an upper-bound and DGL uses zero-copy and it will not allocate 20GB memory at once.
net_type (str, optional) โ [Deprecated] Networking type, can be โsocketโ only.
num_worker_threads (int) โ The number of OMP threads in each sampler process.
use_graphbolt (bool, optional) โ Whether to use GraphBolt for distributed train.
Note
Users have to invoke this API before any DGLโs distributed API and framework-specific distributed API. For example, when used with Pytorch, users have to invoke this function before Pytorchโs pytorch.distributed.init_process_group.