RegOpLibInit
Function
Registers the initialization function of a custom operator dynamic library.
Function Prototype
OpLibRegister &RegOpLibInit(OpLibInitFunc func)Parameters
| Parameter | Input/Output | Description |
|---|---|---|
| func | Input | Custom initialization function to be registered, of type OpLibInitFunc. using OpLibInitFunc = uint32_t (*)(ge::AscendString&); |
Return Value
Returns an OpLibRegister object that newly registers the OpLibInitFunc function func.
Constraints
None
Example
uint32_t Init(ge::AscendString&) {
// init func
return 0;
}
REGISTER_OP_LIB(vendor_1).RegOpLibInit(Init); // Register the initialization function Init for the vendor named vendor_1.