已合并
broadcast_to算子性能优化: nddma条件优化 #1974
broadcast_to算子性能优化: nddma条件优化 #1974
已合并
luwenxiang创建于 3月28日
luwenxiang
luwenxiang成员
3月28日

描述

broadcast_to算子性能优化: nddma条件优化

关联的Issue

https://gitcode.com/cann/ops-math/issues/1109

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 luwenxiang 的贡献)
luwenxiangluwenxiang成员
3月28日 创建了 pull request,commit f27e4072
CANN-robot
CANN-robot成员
3月28日 评论:

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
conversion/broadcast_to llimwang, songkai111 (2/2) llimwang (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

luwenxiang1998, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
3月28日 添加了label:cann-cla/yes
CANN-robotCANN-robot成员
3月28日 将FelixTang7,zhou-qilong,wangrui_,rxtfeng,loov1,zhangzijie,songkai111,zhangyuxiang0119,llimwang,gubaocheng设为评审人
CANN-robotCANN-robot成员
3月28日 将FelixTang7,zhou-qilong,wangrui_,rxtfeng,loov1,zhangzijie,songkai111,zhangyuxiang0119,llimwang,gubaocheng设为审查人
CANN-robot
CANN-robot成员
3月28日 评论:

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

likedislike
CANN-robot
CANN-robot成员
3月28日 评论:

问题/功能描述

本次PR移除了BroadcastTo算子在特定TILING模式下的一个过度优化逻辑,解决了其可能引发的潜在性能问题。同时,通过扩展DMA广播模式的判断条件,优化了特定维度组合下的计算路径选择,旨在提升算子在更广泛场景下的整体性能。

修改方案描述

具体修改包括:1)在UpdateTilingKey函数中,移除了TILING_MODE_LAST_DIM_SMALL_A模式下根据单次搬运数据量与缓存行大小关系来动态调整uLpUnit_的代码。2)在CalcTensorSize函数中,为isDMABrcA_的判断新增了一个分支,当输出张量最后一维尺寸小于8且倒数第四维及之后的维度总大小小于最小张量尺寸时,也启用DMA广播模式,从而优化了计算路径。

likedislike
luwenxiangluwenxiang成员
3月28日 update merge request[project id: 7649531, iid: 1974, commit_id: 701668d9093375c794d672958e6cef1f63748395] virtual merging success
luwenxiangluwenxiang成员
3月28日 强制推送  1 个提交:3aa736c1-broadcast算子性能优化: nddma条件优化
luwenxiangluwenxiang成员
3月28日 update merge request[project id: 7649531, iid: 1974, commit_id: fa4b1768713de4852d701a47ecb028a44e1630ed] virtual merging success
CANN-robot
CANN-robot成员
3月28日 评论:

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

likedislike
luwenxiang
luwenxiang成员
3月28日 评论:

compile

likedislike
CANN-robotCANN-robot成员
3月28日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
3月28日 评论:

流水线任务触发成功
任务链接 [fb82badc21cb4ab2b403d49d2236cb08][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_A5_ubuntu24 ✅ SUCCESS >>>>>
harmony-infer ✅ SUCCESS
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ✅ SUCCESS >>>>>
Compile_X86_monitor ✅ SUCCESS >>>>> >>>>>
Compile_ARM_monitor ✅ SUCCESS >>>>> >>>>>
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
UT_Test ✅ SUCCESS
UT_Test_experimental ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
Smoke_A900_npupool ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>

[2026-03-28 20:36:07]    CI执行结束

likedislike
luwenxiangluwenxiang成员
3月28日 修改了pull request 的描述
此处折叠了5条事件消息 查看更多
CANN-robotCANN-robot成员
3月28日 添加了label:ci-pipeline-passed
llimwang成员
3月30日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
3月30日 添加了label:approved
songkai111成员
3月30日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
3月30日 添加了label:lgtm
CANN-robot
CANN-robot成员
3月30日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: llimwang.
Reviewers who wrote a comment of /lgtm are: llimwang, songkai111.

likedislike
CANN-robotCANN-robot成员
3月30日 关闭了关联的issue
CANN-robotCANN-robot成员
3月30日 合入了pull request