What problem does it solve?
This Skill provides a structured, step-by-step process for adding new operator (op) support to the MNN deep learning framework, ensuring correctness and maintainability through Test-Driven Development (TDD).
Core Features & Use Cases
- Schema Definition: Defines new operator types and their parameters using FlatBuffers Schema.
- Shape Inference: Implements logic to calculate output tensor shapes based on input shapes and parameters.
- Compute Implementation: Provides methods for both geometric decomposition (reusing existing ops) and direct CPU backend implementation.
- Unit Testing: Guides the creation of comprehensive unit tests to verify operator correctness across various scenarios.
- Backend Extension: Outlines the process for extending support to hardware accelerators like Metal, OpenCL, Vulkan, and CUDA.
- Use Case: A developer needs to add a novel activation function or a custom layer to MNN. This Skill guides them through defining the op, implementing its logic, testing it thoroughly, and potentially optimizing it for different hardware.
Quick Start
Follow the step-by-step instructions in the skills/add-new-op directory to add a new operator to the MNN framework.