aclGetCompileopt

Applicability

Product

Supported

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

Description

Obtains the values of compilation options.

You can call this API to obtain the current values of compilation options. Before aclSetCompileopt is called, this API returns the default value of each compilation option. After aclSetCompileopt is called, this API returns the value set by the user.

This API is not required in scenarios that do not involve building (for example, single-operator API execution).

Prototype

aclError aclGetCompileopt(aclCompileOpt opt, char *value, size_t length)

Parameters

Parameter

Input/Output

Description

opt

Input

Compilation option.

value

Output

Pointer to the memory for storing compilation option values.

Before calling this API, you need to allocate memory for saving the values of compilation options. You can call aclGetCompileoptSize to get the memory size.

length

Input

Size of the memory specified by value, in bytes.

Returns

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