已合并
【fix】: code warning #4795
tang-haojie创建于 21 天前
【fix】: code warning #4795
已合并
tang-haojie创建于 21 天前
tang-haojie成员
21 天前

Pull Request

描述

code warning

变更类型

请选择本次引入的变更类型:

关联的Issue

如何测试

描述测试此变更的步骤和前提条件:
1.
2.

核对清单

其他信息

在此添加任何其他关于本次 PR 的说明。

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 tang-haojie 的贡献)
Ttang-haojie成员
21 天前 添加了label:enhancement
Ttang-haojie成员
21 天前 创建了 pull request,commit fa7166ee
atomgit-bot
atomgit-bot
21 天前 评论:

变更摘要

本 PR 主要修复代码编译告警(code warning):为 SuperKernelPass 中不修改成员状态的三个成员函数补充 const 限定(含头文件声明同步),为示例 Python 脚本补齐文件头注释以消除格式告警,并在 DeviceHbmToHostPermanent 中对新建输出增加空指针断言以消除潜在告警。

主要改动

  • 成员函数声明 const: 在 super_kernel_pass.h 中将 GetEventId、GetKernelType、FillCoreLimit 三个方法的声明加上 const 限定。
  • 成员函数定义同步 const: 在 super_kernel_pass.cc 中,SuperKernelPass::GetEventId、SuperKernelPass::GetKernelType、SuperKernelPass::FillCoreLimit 的定义同步补充 const,使声明与定义保持一致,消除 const 一致性告警。
  • 示例脚本补充文件头: 为 examples/fusion_pass/graph_base_pass/1_fuse_matmul_add_pass/data/ 下的 tensorflow_generate.py 与 tf_forward.py 各添加 shebang(#!/usr/bin/env python3)、编码声明(# -*- coding: utf-8 -*-)及注释分隔行。
  • 增加空指针断言: 在 runtime/v2/lowering/placement/placed_lowering_result.cc 的 DeviceHbmToHostPermanent 中,对 bg::DevMemValueHolder::CreateSingleDataOutput 的返回值 dst_address 新增 GE_ASSERT_NOTNULL(dst_address) 校验,防止后续调用 AddDependency 时使用空指针。
likedislike
不准确?
atomgit-bot
atomgit-bot
21 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
Ttang-haojie成员
21 天前 修改了pull request 的描述
CANN-robotCANN-robot成员
21 天前 添加了label:cann-cla/yes
Ttang-haojie成员
21 天前 修改了pull request 的描述
Ttang-haojie成员
21 天前 修改了pull request 的描述
CANN-robot
CANN-robot成员
21 天前 评论:

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

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

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

compile

likedislike
Ttang-haojie成员
21 天前 预合并成功(commit_id: e63567b892b58517eff0a37e5df57507bb0e5259)
CANN-robot
CANN-robot成员
21 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
21 天前 添加了label:ci-pipeline-running
此处折叠了6条事件消息 查看更多
CANN-robotCANN-robot成员
21 天前 添加了label:cann-cla/yes
tang-haojie成员
21 天前 评论:

compile

likedislike
Ttang-haojie成员
21 天前 预合并成功(commit_id: c100be1680ae4724d62a58dacf6fbed49592e168)
CANN-robot
CANN-robot成员
21 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
21 天前 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
21 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
21 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
21 天前 添加了label:ci-pipeline-passed
夏国正成员
21 天前 评论:

/lgtm

likedislike
yuht9成员
21 天前 评论:

/lgtm

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

/approve

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