Pull Request已成功合入, 合并人@CANN-robot
(感谢 张喻翔 的贡献)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 |
|---|---|---|
| */*/op_host/op_api/*.h | ✅ wangyongguang, zhou-qilong (2/2) | ✅ wangyongguang (1/1) |
| quant | ✅ zhou-qilong, wangyongguang, zhajianqing123 (3/2) | ✅ wangyongguang, zhajianqing123, zhou-qilong (3/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
zhangyuxiang0119, 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!


compile


流水线任务触发成功
任务链接 [d80bd39ca58246039565eddcdcebae65][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| 解析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 | ⚠️ WARNING | >>>>> | |
| 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-14 17:23:28] CI执行结束


问题/功能描述
本次PR主要对aclnn_fake_quant_per_channel_affine_cachemask和aclnn_fake_quant_per_tensor_affine_cachemask两个假量化算子进行代码重构。核心目标是消除两个算子实现中重复的输入张量连续性处理和数据类型提升逻辑,以提升代码的可维护性和一致性。
修改方案描述
通过创建公共头文件fake_quant_common.h和实现文件fake_quant_common.cpp,将重复的输入张量Contiguous和Cast操作封装至新的公共函数GetContiguousInput中。该函数统一处理输入张量的连续内存转换和数据类型提升。重构后,两个算子的主逻辑大幅简化,仅需调用此公共函数即可获得处理后的输入,有效减少了代码冗余。


quant/fake_quant_affine_cachemask/op_host/op_api/fake_quant_common.h#endif
在#endif后添加一个换行符,确保文件以换行符结束。
此评论由代码审查工具自动生成


quant/fake_quant_affine_cachemask/op_host/op_api/fake_quant_common.h/*! * \file fake_quant_common.cpp * \brief */
将注释中的文件名更正为fake_quant_common.h,确保文档与实际代码一致。
此评论由代码审查工具自动生成


quant/fake_quant_affine_cachemask/op_host/op_api/fake_quant_common.h/*! * \file fake_quant_common.cpp * \brief */
将文件头注释中的文件名修改为实际的文件名'fake_quant_common.h',确保文档与实际代码保持一致。
此评论由代码审查工具自动生成


/lgtm
/approve


/lgtm
/approve


/lgtm
/approve


Review Guide
This pull-request passes review.
Committers who wrote a comment of /approve are: zhajianqing123, zhou-qilong, wangyongguang.
Reviewers who wrote a comment of /lgtm are: zhajianqing123, zhou-qilong, wangyongguang.


The MR can not be merged, because of CodeReview discussion not resolved
If you want to solve this problem, you can click here to do it in the FAQs.


Review Guide
This pull-request passes review.
Committers who wrote a comment of /approve are: zhajianqing123, zhou-qilong, wangyongguang, chenqi317.
Reviewers who wrote a comment of /lgtm are: zhajianqing123, zhou-qilong, wangyongguang, chenqi317.


描述
将输入scale、zeropoint转连续后计算,避免产生非连续报错问题
关联的Issue
关联Issue #1498
测试
单算子custom包功能和精度验证成功。
文档更新
类型标签