提交 b17a02d4 编写于 作者: M Megvii Engine Team

feat(mge/distributed): deprecate get_device_count_by_fork

GitOrigin-RevId: 6147c3ae905c65a532fe000aa51546abdfddc96f
上级 f8b0f2cb
......@@ -15,12 +15,12 @@ from weakref import WeakSet
import numpy as np
from megengine.autodiff.grad_manager import GradManager, get_backwarding_grad_manager
from megengine.device import get_default_device, get_device_count
from ..core._imperative_rt.core2 import apply
from ..core.ops.builtin import ParamPackConcat, ParamPackSplit
from ..functional.tensor import copy
from ..tensor import Tensor
from ..utils.deprecation import deprecated_func
from ..utils.future import Future
from . import group as _group
from .functional import _bcast_param, all_reduce_sum, broadcast
......@@ -193,6 +193,11 @@ def _check_device_initialized(device_type: str, rank: int):
raise RuntimeError(errmsg)
get_device_count_by_fork = deprecated_func(
"1.5", "megengine.device", "get_device_count", False
)
def bcast_list_(inps: list, group: Group = WORLD):
"""
Broadcast tensors between given group.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册