mindspore.ops.communication.set_comm_ops_inplace

View Source On AtomGit
mindspore.ops.communication.set_comm_ops_inplace(is_enable, func_list=None)[source]

Set inplace attribute to communication function.

Parameters
  • is_enable (bool) – Whether to enable inplace.

  • func_list (list, optional) – Indicates which functions have their inplace attributes set. Default: None.

Raises
  • TypeError – If is_enable is not bool.

  • TypeError – If func_list is not None and not list.

  • ValueError – The function name in func_list is invalid.

Supported Platforms:

Ascend

Examples

Note

Before running the following examples, you need to configure the communication environment variables.

For Ascend devices, it is recommended to use the msrun startup method without any third-party or configuration file dependencies. Please see the msrun startup for more details.

>>> from mindspore.ops.communication import set_comm_ops_inplace
>>> set_comm_ops_inplace(True)