Browse Source

docs(mge/distributed): add document for distributed.backend

GitOrigin-RevId: 6cdcf7af77
release-1.5
Megvii Engine Team 3 years ago
parent
commit
d811dc5478
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      imperative/python/megengine/distributed/__init__.py

+ 12
- 0
imperative/python/megengine/distributed/__init__.py View File

@@ -31,6 +31,18 @@ from .server import Client, Server


@mproperty @mproperty
def backend(mod): def backend(mod):
r"""
Get or set backend of collective communication.
Available backends are ['nccl', 'shm', 'rccl']

Examples:

.. code-block::

import megengine.distributed as dist
dist.backend = "nccl"

"""
assert group._sd, "please call init_process_group first" assert group._sd, "please call init_process_group first"
return group._sd.backend return group._sd.backend




Loading…
Cancel
Save