Pull Request已成功合入, 合并人@CANN-robot
(感谢 yu_qinfei 的贡献)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 |
|---|---|---|
| index | ✅ chenqi317, fanqirui (2/2) | ✅ chenqi317 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
yu_qinfei, thanks for your pull request. All authors of the commits have signed the CLA. 👍


🔵 source code change are detected, tasks labels is removed in this pull request!


流水线任务触发成功
任务链接 [9892ed040ae4474f97ab9e53a0d84ac8][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| 解析CI分支 | ✅ SUCCESS | ||
| codecheck | ✅ SUCCESS | >>>>> | |
| anti_virus | ✅ SUCCESS | >>>>> | |
| Check_Pr | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950 | ✅ SUCCESS | >>>>> | >>>>> |
| API_Check | ✅ SUCCESS | >>>>> | |
| Pre_Compile | ✅ SUCCESS | ||
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_950_ubuntu24 | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_single_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_ARM_950_ubuntu24 | ✅ SUCCESS | >>>>> | |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| UT_Test_opgraph | ✅ SUCCESS | ||
| Smoke_A900_npupool | ✅ SUCCESS | >>>>> |
[2026-03-16 11:49:34] CI执行结束


问题/功能描述
本次PR旨在为ReverseSequence算子补充并注册其数据类型推断功能。原算子缺少此逻辑,导致其输出数据类型无法确定,影响了图编译和模型推理流程的完整性。本次修改解决了该问题,确保了算子输出数据类型与输入保持一致,从而完善了算子的功能。
修改方案描述
修改方案是在ReverseSequence算子的形状推断实现中,新增了一个静态函数InferDataType4ReverseSequence。该函数通过框架提供的InferDataTypeContext上下文获取第一个输入张量的数据类型,并将其直接设置为第一个输出张量的数据类型。最后,通过IMPL_OP_INFERSHAPE宏将此数据类型推断函数与已有的形状推断函数一同注册到算子实现中,从而完成了算子推断逻辑的完整注册。


/lgtm


描述
fix ReverseSequecne infershape error
关联的Issue
https://gitcode.com/cann/ops-nn/issues/1428
测试
文档更新
类型标签