368 Star 1.6K Fork 1.1K

MindSpore/docs
Closed

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
op_custom.rst 2.38 KB
Copy Edit Raw Blame History
宦晓玲 authored 2025-12-10 10:21 +08:00 . modify links 2.7.2

Custom Operators

View Source On Gitee
.. toctree::
   :maxdepth: 1
   :hidden:

   operation/op_custom_prim
   operation/op_custom_ascendc
   operation/op_custom_aot
   operation/op_custom_adv
   operation/op_customopbuilder
   operation/cpp_api_for_custom_ops
   operation/op_customopbuilder_atb
   operation/op_customopbuilder_asdsip
   operation/op_customopbuilder_aclnn

When built-in operators cannot meet requirements during network development, you can use MindSpore's custom operator functionality to integrate your operators. Currently, MindSpore provides two approaches for integrating custom operators:

Interface Comparison Custom Primitive CustomOpBuilder
Supported Modes Graph Mode and PyNative Mode PyNative Mode
Interface Functions Provides a unified Custom Primitive that calls user interfaces at various stages of operator execution. Compiles and loads custom operator modules online, which can be directly applied to networks.
Advantages Supports both Graph and PyNative mode , with operator scheduling and execution processes consistent with built-in operators, ensuring high performance. Enables operator development based on C++ tensors, offering a more intuitive custom execution process.
Disadvantages Has more interface restrictions, and the operator execution process is not visible to users. Involves multiple interfaces for operator development; currently lacks a concise and efficient C++ API, making the development of high-performance operators challenging.
Feature Level STABLE BETA
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mindspore/docs.git
git@gitee.com:mindspore/docs.git
mindspore
docs
docs
r2.7.2

Search