GetCapability

Applicability

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

x

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

x

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

x

Note: For Atlas A2 training products/Atlas A2 inference products, only the Atlas 800I A2 inference server and A200I A2 Box heterogeneous subrack are supported.

Function Description

Queries the library capabilities. The upper layer can call this API before Initialize to check whether the current AdxlEngine library supports specific capabilities (such as Auto Connect and Client/Server communication), avoiding hardcoding default values or incompatibility with the .so file of an earlier version.

Prototype

static Status GetCapability(FeatureType feature_type, int32_t &value)

Parameters

Parameter

Input/Output

Description

feature_type

Input

Feature type. For details, see FeatureType.

value

Output

Feature support. 1: supported (FEATURE_SUPPORTED); 0: not supported (FEATURE_NOT_SUPPORTED).

Returns

  • SUCCESS: Success.
  • UNSUPPORTED: unknown or unsupported feature type.
  • PARAM_INVALID: invalid parameter (feature_type is a negative number).

Constraints

  • This API can be called without calling Initialize.
  • This API is static and does not depend on the AdxlEngine instance.