Function: get_device_info

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 information about a specified device.

Prototype

  • C Prototype

    aclError aclrtGetDeviceInfo(uint32_t deviceId, aclrtDevAttr attr, int64_t *value)
    
  • Python Function

    value, ret = acl.rt.get_device_info(device_id, attr)
    

Parameters

Parameter Description
device_id Int, device ID.
attr Int, enumerated value. For details, see aclrtDevAttr.

Return Values

Return Value Description
ret Int, error code. If 0 is returned, the operation is successful. If other values are returned, the operation fails.
value Int, device attribute value.