GetOption
Applicable Products
All processors
Header File/Library File
- Header file: #include <exe_graph/runtime/op_compile_context.h>
- Library file: liblowering.so
Function Usage
Retrieves the configuration option value from the build-time graph context. The corresponding option value is queried by the specified option_key and output accordingly. This API is used to obtain global configuration parameters (such as build optimization options) during operator build.
Prototype
1 | ge::graphStatus GetOption(const ge::AscendString &option_key, ge::AscendString &option) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
option_key |
Input |
Key name of the configuration option, which is used to specify the type of the option to be queried. |
option |
Output |
Value of the configuration option. The function writes the query result to this parameter. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
graphStatus |
GRAPH_SUCCESS(0): success. Other values: failure. |
Restrictions
None
Parent topic: OpCompileContext