Overview
Project-based operator development refers to the process of operator implementation, build and deployment, and automatic code generation for single-operator calling based on the automatically generated custom operator project.
You are advised to follow this standard process to develop operators. The development code is more standard, unified, and easy to maintain, and the process integrates single-operator API calling, operator graph import, and AI framework calling, so that you can easily implement the preceding functions through the CANN framework.
The following figure shows the project-based operator development process.

- Set up the environment.
- Install the CANN software. For details, see Environment Setup.
- Create an operator project. Use msOpGen to create an operator development project.
- Implement operators.
- Define the operator prototype. The operator prototype describes the input, output, and attributes of the operator as well as the implementation information of the operator on the AI processor, and associates the operator with the function such as tiling implementation.
- Implement the operator on the kernel and implement tiling on the host. For details, see Operator Implementation. In project-based operator development, you can call tiling APIs to perform tiling development based on the programming framework provided by CANN, and you can also call corresponding APIs on the kernel to obtain tiling parameters. For details, see Operator Implementation on the Kernel and Tiling Implementation on the Host. The additional restrictions are also described in the preceding sections.
- Build and deploy the operator. Use the project compilation script to build and deploy the operator.
- Call the single-operator API. Call the single-operator API to execute the operator based on C language APIs.
Parent topic: Project-based Operator Development