Using MindStudio

For details about how to create an operator project in MindStudio, see "Operator Development > Operator Project Creation" in the MindStudio IDE User Guide .

Develop the operator deliverables according to the following directory structure of the operator project when the TensorFlow/PyTorch/ONNX/Caffe framework is used.

├── cmake                                  // Directory of common files related to build
├── cpukernel                             // AI CPU operator file directory
│   ├── impl                              // Directory of the operator implementation files
│   │   ├── reshape_cust_kernel.cc        // Operator source file
│   │   ├── reshape_cust_kernel.h         // Operator header file.
│   ├── op_info_cfg                       // Directory of the operator information libraries
│   │   ├── aicpu_kernel           
│   │   │   ├── reshape_cust.ini        // Operator information library definition file
│   ├── CMakeLists.txt                    // Build script, which is called by the CMakeLists.txt file in the root directory of the operator project
│   ├── toolchain.cmake                        
├── framework                              // Directory of the operator plugin implementation files
│   ├── tf_plugin                         // Directory of the generated operator plugin code when the source framework is ONNX
│   │   ├── tensorflow_xx_plugin.cc    
│   │   ├── CMakeLists.txt               
│   ├── caffe_plugin                      // Directory of the generated operator plugin code when the source framework is Caffe
│   │   ├── caffe_xx_plugin.cc    
│   │   ├── CMakeLists.txt               
│   └── onnx_plugin                      // Directory of the generated operator plugin code when the source framework is ONNX
│       ├── CMakeLists.txt
│       └── xx_plugin.cc
│   ├── CMakeLists.txt                
├── op_proto                               // Directory of the operator prototype definition files
│   ├── xx.cc 
│   ├── xx.h 
│   ├── CMakeLists.txt  
├── op_tiling  // Directory of files related to operator tiling. Ignore this directory if operator tiling is not involved.
│   ├── CMakeLists.txt
├── scripts                                // Directory of project-related scripts
├── tbe                                    // Directory of TBE operator files
│   ├── impl                              // Directory of the operator implementation file
│   │   ├── xx.py         
│   ├── op_info_cfg                       // Directory of the operator information libraries
│   │   ├── ai_core
│   │   │   ├── {soc_version}            // Directory (named after Ascend AI Processor version) of operator information library definition files (.ini)
│   │   │   │   ├── xx.ini
├── .project                                 // Project information file, including the project type, project description, target device type, and CANN version
├── xx_READEME.md                           // Introduction of the basic functions and information of operators, as well as main operator projects
├── CMakeLists.txt               
├── MyOperator.iml

The project directory structure and main files are as follows when the MindSpore framework is used:

├── .idea
├── mindspore
│   ├── impl                  // Directory of the operator implementation file
│   │   ├── xx_impl.py      // Operator implementation and information file
├── op_proto
│   ├── xx.py                // Operator primitive file
├── .project                   // Project information file, including the project type, project description, type of the target device, and CANN version
├── xx_READEME.md              // Introduction of the basic functions and information of operators, as well as main operator projects
├── MyOperator.iml 

For AI CPU operators, the current version does not support the creation of an operator project that uses the Caffe framework.