mindspore.ops.communication.is_available
- mindspore.ops.communication.is_available()[source]
Checks if distributed module is available.
- Returns
bool, whether this distributed module is available. This function always returns
Truebecause MindSpore always has distributed ability on all platforms.
- 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.
>>> import mindspore as ms >>> from mindspore.ops.communication import is_available >>> ms.set_device(device_target="Ascend") >>> is_available() True