mindspore.device_context.ascend.device_count

View Source On Gitee
mindspore.device_context.ascend.device_count()[source]

Return compute-capable device count of Ascend.

Returns

int, the number of compute-capable Ascend devices.

Examples

>>> import mindspore as ms
>>> print(ms.device_context.ascend.device_count())
8