Function: get_cann_attribute

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 whether the operating environment supports the specified CANN feature.

Prototype

  • C Prototype
    1
    aclError aclGetCannAttribute(aclCannAttr cannAttr, int32_t *value)
    
  • Python Function
    1
    value, ret = acl.get_cann_attribute(cann_attr)
    

Parameter Description

Parameter

Description

cann_attr

Int, the enumerated value of the feature list. One item can be specified for each query. For details, see aclCannAttr.

Return Value Description

Return Value

Description

value

Int, whether the function is supported.

  • 1: supported
  • 0: unsupported

ret

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