检查分布式模块是否可用。
bool,此分布式模块是否可用。该函数始终返回 True,因为MindSpore在所有平台上始终具有分布式能力。
True
Ascend
样例:
说明
运行以下样例之前,需要配置好通信环境变量。
针对Ascend设备,推荐使用msrun启动方式,无第三方以及配置文件依赖。详见 msrun启动 。
>>> import mindspore as ms >>> from mindspore.ops.communication import is_available >>> ms.set_device(device_target="Ascend") >>> is_available() True