mindspore.runtime.set_device_limit

View Source On Gitee
mindspore.runtime.set_device_limit(device, cube_num=- 1, vector_num=- 1)[source]

Sets selected device limit.

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 set device id.

  • cube_num (int, optional) – set cube num for device. Default is -1, indicating that it is not set.

  • vector_num (int, optional) – set vector num for device. Default is -1, indicating that it is not set.

Supported Platforms:

Ascend

Examples

>>> import mindspore as ms
>>> ms.runtime.set_device_limit(0, 8, 8)