已关闭
[Bug-Report|缺陷反馈]: 重复set导致冗余开销 #1790
huanglei92创建于 3月28日关闭于 4月1日
jiangjiawei
3月31日 评论:
3月31日 评论:
/assign @fengqiuyue


CANN-robot
3月31日 评论:
3月31日 评论:
3月31日 关联了pull request:clippedswiglu删除重复set
4月1日 关闭了 issue
4月1日 添加了label:resolved
/assign @fengqiuyue


Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
代码检视过程中,发现cann/ops-nn 库master分支,存在重复调用tilingData_.set_dim2H(dim2H_) 两次,冗余操作
https://gitcode.com/cann/ops-nn/blob/master/activation/clipped_swiglu/op_host/clipped_swiglu_tiling.cpp
第91 94行
tilingData_.set_dim2H(dim2H_);
.....
tilingData_.set_dim2H(dim2H_);
Environment / 环境信息 (Mandatory / 必填)
https://gitcode.com/cann/ops-nn/blob/master/activation/clipped_swiglu/op_host/clipped_swiglu_tiling.cpp
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
code review
Describe the expected behavior / 预期结果 (Mandatory / 必填)
tilingData_.set_coreNumAll(coreNumAll_);
tilingData_.set_dimBatchSize(dimBatchSize_);
tilingData_.set_dim2H(dim2H_); // 保留此行
tilingData_.set_isLongH(isLongH_);
tilingData_.set_isGroup(isGroup_);
// tilingData_.set_dim2H(dim2H_); // 删除此重复行
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
无
Special notes for this issue/备注 (Optional / 选填)