Caffe2 - Python API
A deep learning, cross platform ML framework
__init__.py
1 import torch
2 
3 
4 def is_available():
5  return hasattr(torch._C, "_c10d_init")
6 
7 
8 if is_available() and not torch._C._c10d_init():
9  raise RuntimeError("Failed to initialize PyTorch distributed support")
10 
11 
12 if is_available():
13  from .distributed_c10d import *
14  # Variables prefixed with underscore are not auto imported
15  # See the comment in `distributed_c10d.py` above `_backend` on why we expose
16  # this.
17  from .distributed_c10d import _backend