Function: get_device_count

Applicable Products

  • Ascend 950PR&950DT products: Supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Supported
  • Atlas inference products: Supported
  • Atlas training products: Supported

Function

Obtains the number of available devices.

Prototype

  • C Prototype

    aclError aclrtGetDeviceCount(uint32_t *count)
    
  • Python Function

    count, ret = acl.rt.get_device_count()
    

Parameters

None

Return Values

Return Value Description
count Int, number of devices.
ret Int, error code. If 0 is returned, the operation is successful. If other values are returned, the operation fails.