Pull Request已成功合入, 合并人@CANN-robot
(感谢 季骏 的贡献)变更摘要
本 PR 针对 dynamic_mx_quant 在 2 轴量化中尾轴很小时性能较差的问题进行性能优化,核心思路是通过多行合并计算的方式提升计算效率。改动涉及 op_kernel/arch35 下的两个内核头文件:dynamic_mx_quant_not_tail_axis_optimize_high_perf_large_tail.h 中调整了 half 转 bfloat16_t 的转换 trait 命名及调用,dynamic_mx_quant_not_tail_axis_optimize_high_perf_small_tail.h 则进行了大规模改动以实现小尾轴场景下的性能优化。
主要改动
- 重命名转换 trait: 在
dynamic_mx_quant_not_tail_axis_optimize_high_perf_large_tail.h中,将static constexpr Reg::CastTrait castTraitCublsHalf2Bf16重命名为castTraitCeilAlgHalf2Bf16,保持原有CAST_RINT舍入配置与ZEROING掩码合并模式不变。 - 更新转换调用点: 同步更新该文件中两处
Reg::Cast<bfloat16_t, xDtype, ...>调用(对x0AbsU16、x1AbsU16的half绝对值数据做bfloat16_t转换),使其引用重命名后的castTraitCeilAlgHalf2Bf16。 - 小尾轴场景大规模优化: 对
dynamic_mx_quant_not_tail_axis_optimize_high_perf_small_tail.h进行大幅改动(新增 2001 行、删除 1156 行),依据 PR 描述通过多行合并计算方式优化尾轴很小时的量化计算性能。


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 |
|---|---|---|
| quant | ✅ 苏跃明, 王星 (2/2) | ✅ 苏跃明, 王星 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
ji-jun1, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


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


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


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


/check-pr


The following labels are not ready.
lgtm: Please wait for committers to review the code.
approved: Please wait for committers to review the code.


/lgtm
/approve


/lgtm
/approve


描述
-2轴量化,尾轴很小时,当前实现性能比较差,本PR通过多行合并计算的方式提升了性能
关联的Issue
#5715
测试
已通过ST测试
文档更新
不涉及
类型标签
AI/Agent生成声明