Function: get_device_info

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

Obtains information about a specified device.

Prototype

  • C Prototype
    aclError aclrtGetDeviceInfo(uint32_t deviceId, aclrtDevAttr attr, int64_t *value)
  • Python Function
    1
    value, ret = acl.rt.get_device_info(device_id, attr)
    

Parameter Description

Parameter

Description

device_id

Int, device ID.

attr

Int, enumerated value. For details, see aclrtDevAttr.

Return Value Description

Return Value

Description

ret

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

value

Int, device attribute value.