Function: get_cann_attribute_list

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

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

√

Description

Queries the list of features supported by the CANN software and the corresponding chip in the operating environment.

Prototype

  • C Prototype
    1
    aclError aclGetCannAttributeList(const aclCannAttr **cannAttrList, size_t *num)
    
  • Python Function
    1
    cann_attr_list, num, ret = acl.get_cann_attribute_list()
    

Parameters

None

Return Values

Return Value

Description

cann_attr_list

List, used to save the features supported by the operating environment. For details, see aclCannAttr.

Users do not need to allocate memory in advance. When an app process exits, the memory is automatically freed.

num

Int, the number of supported features. The value must be the same as the length of the cann_attr_list list.

ret

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