Pull Request已成功合入, 合并人@CANN-robot
(感谢 Nice try 的贡献)变更摘要
本 PR 旨在将一批算子的 TensorFlow 框架插件注册迁移/新增到框架层(标题 "migrate TF plugin")。改动全部为新增源码文件,共 16 个 *_tf_plugin.cpp,每个文件在 domi 命名空间下通过 REGISTER_CUSTOM_OP 注册一个自定义算子,统一指定 .FrameworkType(TENSORFLOW)、.OriginOpType(...)、.ParseParamsByOperatorFn(AutoMappingByOpFn) 与 .ImplyType(ImplyType::TVM),使 GE 能够识别并映射 TensorFlow 图中的对应算子。
主要改动
- 新增激活类算子 TF 插件:新增
prelu_grad_tf_plugin.cpp,注册PReluGrad,实现 PRelu 梯度算子在 TensorFlow 框架下的算子映射。 - 新增 RNN/GRU 系列算子 TF 插件:新增
dynamic_augru_tf_plugin.cpp、dynamic_augru_grad_tf_plugin.cpp、dynamic_gruv2_tf_plugin.cpp、dynamic_gruv2_grad_tf_plugin.cpp、dynamic_rnn_grad_tf_plugin.cpp,分别注册DynamicAUGRU、DynamicAUGRUGrad、DynamicGRUV2、DynamicGRUV2Grad、DynamicRNNGrad等动态时序算子。 - 新增归一化/池化/量化类算子 TF 插件:新增
lrn_tf_plugin.cpp、lrn_grad_tf_plugin.cpp、bn_infer_grad_tf_plugin.cpp、max_pool_v2_tf_plugin.cpp、max_pool_v3_tf_plugin.cpp、max_pool_grad_grad_tf_plugin.cpp、max_pool_grad_grad_with_argmax_tf_plugin.cpp、dequantize_tf_plugin.cpp,分别注册LRN、LRNGrad、BNInferGrad、MaxPoolV2、MaxPool、MaxPoolGradGrad、MaxPoolGradGradWithArgmax、Dequantize。 - 新增缓存与中心化算子 TF 插件:新增
lru_cache_v2_tf_plugin.cpp与centralization_tf_plugin.cpp,注册LRUCacheV2与Centralization,其中LRUCacheV2注释明确为向 GE 注册该算子。 - 统一注册方式:所有新增插件均采用
AutoMappingByOpFn自动参数映射并指定ImplyType::TVM,确保算子解析与实现类型配置一致,从而支持 TensorFlow 模型到 GE 的对接。


Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| activation | ✅ 钱泽洪, 陈兴宇 (2/2) | ✅ 陈兴宇, 钱泽洪 (2/1) |
| common | ✅ 刘波, 商晓波 (2/2) | ✅ 刘波 (1/1) |
| norm | ✅ 陈兴宇, 钱泽洪 (2/2) | ✅ 陈兴宇, 钱泽洪 (2/1) |
| pooling | ✅ 钱泽洪, 陈兴宇 (2/2) | ✅ 陈兴宇, 钱泽洪 (2/1) |
| quant | ✅ 钱泽洪, 商晓波 (2/2) | ✅ 钱泽洪 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
Nice_try, thanks for your pull request. All authors of the commits have signed the CLA. 👍


您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!


compile


/approve


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
宋恺


您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!


/approve


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
宋恺


/approve


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
宋恺


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
宋恺


/lgtm


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
宋恺


描述
本次变更为 16 个算子新增 TensorFlow 框架插件注册(
*_tf_plugin.cpp),使这些算子在 TensorFlow 图解析时可通过REGISTER_CUSTOM_OP自动映射到昇腾算子(AutoMappingByOpFn,ImplyType::TVM),注册模式与仓库内已有*_tf_plugin.cpp文件保持一致。新增注册的算子(16 个):
关联的Issue
测试
本次改动仅为算子注册文件(编译期注册),未包含测试用例。
文档更新
无。
类型标签
AI/Agent生成声明