367 Star 1.6K Fork 1K

MindSpore/docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
op_custom.rst 2.30 KB
一键复制 编辑 原始数据 按行查看 历史
DeshiChen 提交于 2025-04-28 10:10 +08:00 . modify tutorals of Custom Operator

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_julia
   operation/op_custom_adv
   operation/op_customopbuilder
   operation/op_customopbuilder_function

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.6.0

搜索帮助