Pull Request已成功合入, 合并人@CANN-robot
(感谢 z30075199 的贡献)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 | ✅ zhou-qilong, chenqi317 (2/2) | ✅ zhou-qilong, chenqi317 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


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


问题/功能描述
本次PR旨在优化SegmentSum算子在特定硬件架构(arch35)上的性能表现。具体问题是,原实现在处理内部维度(inner dimension)介于512至1024之间的数据时,未能启用SIMD(单指令多数据)向量化优化路径,可能限制了计算效率。本次修改通过调整一个关键阈值,使算子在处理此类中等规模数据时能更早地利用硬件并行能力。
修改方案描述
修改方案直接且聚焦,仅将控制SIMD优化启用条件的编译时常量 SIMD_INNER_THRES 从 1024 降低为 512。该常量在 SegmentSumSimdTiling::IsCapable() 函数中使用,用于判断数据形状是否适合SIMD分块。降低阈值后,当数据的内部维度大于512时,算子将选择启用SIMD优化的执行路径,而此前该路径仅在内部维度大于1024时启用。此变更属于性能调优,不涉及核心计算逻辑、接口或安全机制的改动。


流水线任务触发成功 [流水线指导]
任务链接 [1cfec5b566b948a38079080b4b05b18e]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| anti_virus | ✅ SUCCESS | >>>>> | |
| Check_Pr | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ 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 | >>>>> | |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| UT_Test_opgraph | ✅ SUCCESS | ||
| Smoke_A900_npupool | ✅ SUCCESS | >>>>> |
[2026-03-03 11:26:51] CI执行结束


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


描述
优化segment_sum模板条件
关联的Issue
https://gitcode.com/cann/ops-nn/issues/1274
测试
文档更新
类型标签