已合并
refactor: BlockMemAssigner::InsertStreamInEdge 成员函数补充 const 限定 #4778
refactor: BlockMemAssigner::InsertStreamInEdge 成员函数补充 const 限定 #4778
已合并
tangqunzhang创建于 27 天前
tangqunzhang成员
27 天前

Pull Request

描述

BlockMemAssigner::InsertStreamInEdge 仅修改入参 in_edge_set(按引用传入的局部集合),不修改任何成员变量,为其补充 const 成员函数限定,明确接口语义、提升代码可读性。

涉及文件:

  • compiler/graph/build/memory/block_mem_assigner.h(声明补充 const)
  • compiler/graph/build/memory/block_mem_assigner.cc(定义同步补充 const)

变更类型

关联的Issue

无

如何测试

  1. 基于 develop 分支,仅改动两处 const 限定符
  2. 使用 compile_commands.json 单独编译 block_mem_assigner.cc,编译通过(退出码 0)
  3. pre-commit 检查(clang-format/codespell 等)全部通过

核对清单

其他信息

无

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 tangqunzhang 的贡献)
Ttangqunzhang成员
27 天前 创建了 pull request,commit 96ad6e7c
atomgit-bot
atomgit-bot
27 天前 评论:

变更摘要

本次重构为 BlockMemAssigner::InsertStreamInEdge 成员函数补充 const 限定:由于该函数只修改按引用传入的局部集合 in_edge_set,不修改任何成员变量,通过将该成员函数声明为 const 以明确接口语义、提升代码可读性。改动仅涉及声明与定义两处,属于不影响运行行为的纯重构。

主要改动

  • 声明补充 const 限定: 在 compiler/graph/build/memory/block_mem_assigner.h 中,为 BlockMemAssigner::InsertStreamInEdge 的成员函数声明末尾(含默认参数 node_names = {nullptr, nullptr} 之后)追加 const,标明该成员函数不修改对象状态。
  • 定义同步补充 const 限定: 在 compiler/graph/build/memory/block_mem_assigner.cc 中,为同名成员函数的定义签名同步追加 const,与头文件声明保持一致,确保编译通过。
likedislike
不准确?
atomgit-bot
atomgit-bot
27 天前 评论:

🤖 本次改动均为数据 / 生成 / 二进制文件(如测试用例、锁文件、媒体资源),没有可审查的代码逻辑,已跳过 AI 代码审查。

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

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, kobemini, Mexyy (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

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

likedislike
CANN-robotCANN-robot成员
27 天前 将yangyongqiang0606,kobemini,ClarkXie,xchu42,hugo111,lining23666,depeng1994,wqtshg_wt,peiyang,shengnan666,zhangfan_hanq,zhanj,zhujingjing,Mexyy,wangxiaotian995,stevenaw0,yuht9设为评审人
CANN-robotCANN-robot成员
27 天前 将yangyongqiang0606,kobemini,ClarkXie,xchu42,hugo111,lining23666,depeng1994,wqtshg_wt,peiyang,shengnan666,zhangfan_hanq,zhanj,zhujingjing,Mexyy,wangxiaotian995,stevenaw0,yuht9设为审查人
tangqunzhang成员
27 天前 评论:

compile

likedislike
Ttangqunzhang成员
27 天前 预合并成功(commit_id: 4fc49c0c205ed5e7f3ecbf7427959c2a3d06804f)
CANN-robot
CANN-robot成员
27 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
27 天前 添加了label:ci-pipeline-running
夏国正成员
27 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
27 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
27 天前 添加了label:ci-pipeline-passed
GengChao
GengChao成员
27 天前 评论:

/lgtm

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

/approve

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