mindspore.device_context.cpu.is_available

View Source On AtomGit
mindspore.device_context.cpu.is_available()[source]

Returns whether the CPU backend is available.

Returns

bool, whether the CPU backend is available for this MindSpore package.

Examples

>>> import mindspore as ms
>>> print(ms.device_context.cpu.is_available())
True