Function: get_device_capability

Applicability

Product

Supported (√/x)

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

Function Usage

Queries the hardware specifications of the corresponding device in the operating environment.

Prototype

  • C Prototype
    1
    aclError aclGetDeviceCapability(uint32_t deviceId, aclDeviceInfo deviceInfo, int64_t *value)
    
  • Python Function
    1
    value, ret = acl.get_device_capability(device_id, device_info)
    

Parameter Description

Parameter

Description

device_id

Int, device ID.

Must be in the range of [0, Device count – 1]. Call acl.rt.get_device_count to obtain the device count.

device_info

Int, hardware specifications of a device. For details, see aclDeviceInfo.

Return Value Description

Return Value

Description

value

Int, hardware specifications.

ret

Int, error code: 0 on success; else, failure.