Function: get_device_count

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 the number of available devices.

Prototype

  • C Prototype
    1
    aclError aclrtGetDeviceCount(uint32_t *count)
    
  • Python Function
    1
    count, ret = acl.rt.get_device_count()
    

Parameter Description

None.

Return Value Description

Return Value

Description

count

Int, number of devices.

ret

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