Compile
Applicable Products
All processors
Header File/Library File
- Header file: #include <graph/custom_op.h>
- Library file: libgraph.so
Function Usage
Build callback API for custom operators. It is called when an operator enters the GE graph build process. The API is responsible for operator-specific build tasks (for example, generating build artifacts and preparing kernels). Build-time information is obtained via the build context.
Prototype
1 | virtual graphStatus Compile(gert::OpCompileContext *ctx) = 0 |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ctx |
Input |
Operator build context. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
graphStatus |
GRAPH_SUCCESS(0): success. Other values: failure. |
Restrictions
None
Parent topic: CompilableOp