Pull Request已成功合入, 合并人@CANN-robot
(感谢 hemahema 的贡献)变更摘要
本 PR 旨在修复 compiler/graph/optimize/autofuse/temporary_dependencies/ascir/ascir_ops.h 中的告警代码,共两类改动:一是按同类 Get/Set 习惯,为 ExtendConv2DIrAttrDefBase 中三个 setter 的入参补充 const 修饰(这些 setter 不改写入参、只写 attr_store_,且内部需调用非 const 的 GetOrCreateAnyValue,故函数本身不加尾部 const);二是为 ExtendConv2D、ExtendConv2DBias、ExtendConv2DScale、ExtendConv2DBiasScale 补上被 = delete 的移动赋值运算符,使移动构造与移动赋值成对声明,消除告警。
主要改动
- setter 入参加
const:将SetRound_mode、SetEnable_relu0、SetNullptr_inputs_index的入参分别改为const std::string &、const bool、const std::vector<int64_t> &,避免不必要的拷贝,不影响调用方行为。 - 补充移动赋值删除声明:在
ExtendConv2D、ExtendConv2DBias、ExtendConv2DBiasScale、ExtendConv2DScale中原有的operator=(const T &) = delete;之后各新增一行inline T &operator=(T &&) = delete;,使移动赋值与已删除的移动构造函数(T(T &&) = delete;)成对出现。 - 对齐同类代码风格:改动的目标文件为
ascir_ops.h,合计新增 7 行、删除 3 行,均为声明层面修改,不涉及逻辑行为变更。


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 |
|---|---|---|
| repo-cann/ge | ✅ yangyongqiang0606, wangxiaotian995, xchu42 (3/2) | ✅ yangyongqiang0606 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
weixin_45675704, thanks for your pull request. All authors of the commits have signed the CLA. 👍


/compile


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


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
xuyafei


/lgtm


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
xuyafei


/lgtm


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
xuyafei


/approve


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
xuyafei


Pull Request
描述
ascir_ops.h 里和流水线告警对应的两处已经改完。
不加 const 的 Set*
这三个 setter 不会改入参,只写 attr_store_。按同类 Get/Set 习惯,入参改成 const:
SetRound_mode(const std::string &)
SetEnable_relu0(const bool)
SetNullptr_inputs_index(const std::vector<int64_t> &)
函数本身不能再加尾部 const:内部要调非 const 的 GetOrCreateAnyValue,加上会编不过。
移动构造和移动赋值要成对声明(原 7479 / 7561 / 7659 / 7757)
ExtendConv2D、ExtendConv2DBias、ExtendConv2DScale、ExtendConv2DBiasScale 原先只 = delete 了移动构造。已补上对应的移动赋值:
inline ExtendConv2D &operator=(const ExtendConv2D &) = delete;
inline ExtendConv2D &operator=(ExtendConv2D &&) = delete;
inline ExtendConv2D(ExtendConv2D &&) = delete;
变更类型
请选择本次引入的变更类型:
关联的Issue
如何测试
描述测试此变更的步骤和前提条件:
1.
2.
核对清单
其他信息
在此添加任何其他关于本次 PR 的说明。