mindspore.ops.communication.set_comm_ops_inplace

查看源文件
mindspore.ops.communication.set_comm_ops_inplace(is_enable, func_list=None)[源代码]

设置通信函数的inplace属性。

参数:
  • is_enable (bool) - 是否启用inplace。

  • func_list (list,可选) - 指示哪些函数设置了inplace属性。默认值: None

异常:
  • TypeError - 如果 is_enable 不是bool。

  • TypeError - 如果 func_list 不是 None 且不是list。

  • ValueError - func_list 中的函数名无效。

支持平台:

Ascend

样例:

说明

运行以下样例之前,需要配置好通信环境变量。

针对Ascend设备,推荐使用msrun启动方式,无第三方以及配置文件依赖。详见 msrun启动

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