aclplatformGetInstructionInfo

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

√

Atlas inference products

√

Atlas training products

√

Function

Queries the hardware information of the corresponding AI processor product.

Prototype

1
aclError aclplatformGetInstructionInfo(aclplatformCoreType type, const char *instruction, char *value, uint32_t maxLen)

Parameters

Parameter

Input/Output

Description

type

Input

Core type to be queried. For details about the type definition, see aclplatformCoreType.

instruction

Input

Name string of the instruction to be queried, for example, Intrinsic_vexp or Intrinsic_vln.

For details about the instruction set, see the configuration file of the corresponding AI processor in the ${INSTALL_DIR}/{arch-os}/data/platform_config/ directory. ${INSTALL_DIR} must be replaced with the actual CANN installation path. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann. In {arch-os}, arch indicates the OS architecture, and os indicates the OS.

value

Output

Pointer to the character buffer for receiving the query result. The returned content is a character string.

maxLen

Input

Maximum memory size (in bytes) for storing the value.

If the actual result exceeds this length, the API returns an error.

Returns

0 on success; otherwise, failure. For details, see aclError.