diff --git a/mindspore/common/_decorator.py b/mindspore/common/_decorator.py index 88d6e0226a..892d76548f 100644 --- a/mindspore/common/_decorator.py +++ b/mindspore/common/_decorator.py @@ -19,7 +19,7 @@ def deprecated(version, substitute): """deprecated warning Args: - version (str): version that the operator or function will be deprecated. + version (str): version that the operator or function is deprecated. substitute (str): the substitute name for deprecated operator or function. """ diff --git a/mindspore/ops/functional.py b/mindspore/ops/functional.py index f1d066224f..6cbc2a1c07 100644 --- a/mindspore/ops/functional.py +++ b/mindspore/ops/functional.py @@ -41,8 +41,12 @@ ones_like = P.OnesLike() shape = P.Shape() rank = P.Rank() reshape = P.Reshape() + # control_depend: represent dependency between two operators -control_depend = P.ControlDepend() +def control_depend(src, dst): + control_depend_op = P.ControlDepend() + return control_depend_op(src, dst) + merge = P.Merge() geswitch = P.GeSwitch() addn = P.AddN()