|
@@ -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 |
|
|
|
|
|
|
|
|