Merged
新增MhcPreSinkhorn正反向算子graph_convert文件 #8382
taochangminAdd on Jul 7
新增MhcPreSinkhorn正反向算子graph_convert文件 #8382
Merged
Merged fromtaochangmin/ops-transformermasterintocann/ops-transformermaster
Pull Request has been successfully merged by CANN-robot.
(Thank you for taochangmin's contribution.)Jul 7 Created pull request, commit 68604001
atomgit-bot
Jul 7 Comments:
Jul 7 Comments:
变更摘要
为 MhcPreSinkhorn 算子的前向和反向分别新增 GE Converter,使其在 GE 图模式下能够通过 register_fx_node_ge_converter 将对应的 torch.ops.cann_ops_transformer 自定义算子转换为 GE IR 表示,打通图编译路径。
主要改动
- 新增
graph_convert_mhc_pre_sinkhorn.py:定义了MhcPreSinkhornGE 算子(4 输入、8 输出,含hc_mult/num_iters/hc_eps/norm_eps/need_backward属性),并通过convert_mhc_pre_sinkhorn注册到torch.ops.cann_ops_transformer.mhc_pre_sinkhorn.default。 - 新增
graph_convert_mhc_pre_sinkhorn_backward.py:定义了MhcPreSinkhornBackwardGE 算子(12 输入含 3 个梯度、4 个前向输入及 5 个中间结果,4 个梯度输出,含hc_eps属性),并通过convert_mhc_pre_sinkhorn_backward注册到torch.ops.cann_ops_transformer.mhc_pre_sinkhorn_backward.default。 - 双向 GE IR 定义:前向和反向均通过
IrDef声明了完整的 IR 结构(输入/输出数据类型、属性默认值),与REG_OP文档注释保持一致,确保图编译时的类型匹配与校验。


Incorrect?
Jul 7 Added label: cann-cla/yes
CANN-robot
Jul 7 Comments:
Jul 7 Comments:
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
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| sig-ops-transformer | ✅ 蒋礼锐, 马兵 (2/2) | ✅ 蒋礼锐 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
taochangmin, thanks for your pull request. All authors of the commits have signed the CLA. 👍


Jul 7 Set monologue815,jiang-lirui,Allan_Yu,liudan12,mabing1118 as approver
53 messages are collapsed here。 See more
mabing
Jul 15 Comments:
Jul 15 Comments:
/lgtm


jiang-lirui
Jul 15 Comments:
Jul 15 Comments:
/approve
/lgtm


Jul 15 Added label: lgtmapproved
Jul 15 Closed associated issue
Jul 15 Merged pull request
描述
MhcPreSinkhorn正反向算子新增GE Converter文件,支持ge图模式
关联的Issue
https://gitcode.com/cann/ops-transformer/issues/3698
测试
torch图模式调用测试
文档更新
类型标签