Overview
After writing the implementation code of a custom operator, develop an operator plugin to map an operator developed based on a third-party framework to one supported by Ascend AI Processor. Call the REGISTER_CUSTOM_OP macro to implement operator adaptation. As shown in the following, the calling starts with the REGISTER_CUSTOM_OP macro. Then, APIs such as FrameworkType, OriginOpType, and ParseParamsFn are linked with a dot (.).
Example:
1 2 3 4 5 | REGISTER_CUSTOM_OP("OpType") .FrameworkType(TENSORFLOW) .OriginOpType("OriginOpType") .ParseParamsByOperatorFn(ParseParamFunc) .ImplyType(ImplyType::TVM); |
Parent topic: OpRegistrationData