Developing a Custom Operator
If the TensorFlow network contains operators that are not supported by CANN, you can customize Ascend C operators and adapt them to the TensorFlow framework. The following figure shows the process.

- Develop a custom operator.
Develop a custom operator based on Ascend C. The development process includes the following steps:
- Create an operator project.
- Implement the operator, including operator prototype definition, operator implementation on the kernel, and tiling implementation on the host.
- Integrate the operator into a graph by implementing the corresponding adaptation functions such as shape inference.
- Develop the TensorFlow adaptation plugin.
Register the custom operator by calling REGISTER_CUSTOM_OP and map the TensorFlow custom operator to the CANN operator. In this case, you also need to develop the TensorFlow custom operator.
- Build and deploy the operator project. Build and generate the custom operator installation package, install the operator package, and deploy the custom operator to the operator acceleration library.
- Call the operator in TensorFlow.
For details about the preceding process, see "Integrating Operators into a GE Graph" in the Ascend C Operator Development Guide.
Parent topic: Additional Features