已合并
fix: 修复告警代码 #4798
hemahema创建于 2 天前
fix: 修复告警代码 #4798
已合并
hemahema创建于 2 天前
hemahema
hemahema
2 天前

Pull Request

描述

ascir_ops.h 里和流水线告警对应的两处已经改完。

  1. 不加 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,加上会编不过。

  2. 移动构造和移动赋值要成对声明(原 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 的说明。

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 hemahema 的贡献)
hemahemahemahema
2 天前 添加了label:enhancement
hemahemahemahema
2 天前 创建了 pull request,commit f8572eb2
atomgit-bot
atomgit-bot
2 天前 评论:

变更摘要

本 PR 旨在修复 compiler/graph/optimize/autofuse/temporary_dependencies/ascir/ascir_ops.h 中的告警代码,共两类改动:一是按同类 Get/Set 习惯,为 ExtendConv2DIrAttrDefBase 中三个 setter 的入参补充 const 修饰(这些 setter 不改写入参、只写 attr_store_,且内部需调用非 const 的 GetOrCreateAnyValue,故函数本身不加尾部 const);二是为 ExtendConv2DExtendConv2DBiasExtendConv2DScaleExtendConv2DBiasScale 补上被 = delete 的移动赋值运算符,使移动构造与移动赋值成对声明,消除告警。

主要改动

  • setter 入参加 const:将 SetRound_modeSetEnable_relu0SetNullptr_inputs_index 的入参分别改为 const std::string &const boolconst std::vector<int64_t> &,避免不必要的拷贝,不影响调用方行为。
  • 补充移动赋值删除声明:在 ExtendConv2DExtendConv2DBiasExtendConv2DBiasScaleExtendConv2DScale 中原有的 operator=(const T &) = delete; 之后各新增一行 inline T &operator=(T &&) = delete;,使移动赋值与已删除的移动构造函数(T(T &&) = delete;)成对出现。
  • 对齐同类代码风格:改动的目标文件为 ascir_ops.h,合计新增 7 行、删除 3 行,均为声明层面修改,不涉及逻辑行为变更。
likedislike
不准确?
atomgit-bot
atomgit-bot
2 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
2 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
2 天前 评论:

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 /approve or /lgtm
  • Commenting /approve implies 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. 👍

likedislike
hemahemahemahema
2 天前 修改了pull request 的描述
CANN-robotCANN-robot成员
2 天前 将yangyongqiang0606,kobemini,ClarkXie,tangqunzhang,xchu42,hugo111,lining23666,depeng1994,wqtshg_wt,peiyang,shengnan666,zhangfan_hanq,zhanj,zhujingjing,Mexyy,wangxiaotian995,stevenaw0,yuht9设为评审人
CANN-robotCANN-robot成员
2 天前 将yangyongqiang0606,kobemini,ClarkXie,tangqunzhang,xchu42,hugo111,lining23666,depeng1994,wqtshg_wt,peiyang,shengnan666,zhangfan_hanq,zhanj,zhujingjing,Mexyy,wangxiaotian995,stevenaw0,yuht9设为审查人
hemahemahemahema
2 天前 修改了pull request 的描述
hemahemahemahema
2 天前 修改了pull request 的描述
hemahema
hemahema
2 天前 评论:

/compile

likedislike
hemahemahemahema
2 天前 update merge request[project id: 8824148, iid: 4798, commit_id: 2870c6361bd103f5ba496362667b8a9ab855060b] virtual merging success
CANN-robot
CANN-robot成员
2 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
2 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
2 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
2 天前 添加了label:ci-pipeline-passed
xuyafei成员
2 天前 评论:

/lgtm

likedislike
CANN-robot
CANN-robot成员
2 天前 评论:

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

likedislike
wangxiaotian995成员
2 天前 评论:

/lgtm

likedislike
CANN-robot
CANN-robot成员
2 天前 评论:

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

likedislike
xchu42
xchu42成员
2 天前 评论:

/lgtm

likedislike
CANN-robot
CANN-robot成员
2 天前 评论:

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

likedislike
CANN-robotCANN-robot成员
2 天前 添加了label:lgtm
yangyongqiang
yangyongqiang成员
2 天前 评论:

/approve

likedislike
CANN-robot
CANN-robot成员
2 天前 评论:

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

likedislike
CANN-robotCANN-robot成员
2 天前 添加了label:approved
CANN-robotCANN-robot成员
2 天前 合入了pull request