mindspore.runtime.get_device_limit

View Source On Gitee
mindspore.runtime.get_device_limit(device)[source]

Return selected device limit core num.

Note

  • This interface will synchronize the operator issuance, which may affect performance.

  • Only support PyNative mode, Graph mode is not currently supported.

Parameters

device (int) – selected device id.

Returns

limit info (dict), device limit core num.

Supported Platforms:

Ascend

Examples

>>> import mindspore as ms
>>> ms.runtime.get_device_limit(0)