Developing Custom Operators
Sample Obtaining
Go to the Ascend samples repository on Gitee or GitHub and download the sample package that matches the required version. For the version mapping, see "Release Notes" in the README file. Find the sample in the cplusplus/level1_single_api/4_op_dev/1_custom_op directory.
The sample package provides sample code for developing TBE custom operators, AI CPU custom operators, and TensorFlow scope fusion patterns, as well as the operator build scripts. You can build your own custom OPP based on the sample or add your own custom operator implementation code to the sample.
You can obtain more samples from the tools/msopgen/template/custom_operator_sample directory in the CANN component directory. For details, see Custom Operator Template.
Sample Description
Build and deploy the sample operator project. For details, see the README.md file of each sample operator.
Do not modify the sample project or the build configuration file that is automatically generated to avoid operator execution failures.