已合并
update A5 doc #492
liuyufan创建于 2025年12月24日
update A5 doc #492
已合并
liuyufan创建于 2025年12月24日
liuyufan
liuyufan成员
2025年12月24日

描述

修复部分文档问题

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 liuyufan 的贡献)
CANN-robot
CANN-robot成员
2025年12月24日 评论:

Thank your for your pull-request.

The full list of commands accepted by me can be found at here.

You can get sig-info at here

likedislike
CANN-robot
CANN-robot成员
2025年12月24日 评论:

以下是根据您提交的修改文件推荐的Reviewer和Committer序列,需各模块评审通过后方可合入

Module List Reviewers Committers
sig-ops-nn zhang-wu, lileizheng, yu-xinjie62, chaotang233, wangyongguang liubo75, crystalhu, tangweiwei2, chenqi317
likedislike
CANN-robotCANN-robot成员
2025年12月24日 添加了label:cann-cla/yes
liuyufan
liuyufan成员
2025年12月24日 评论:

compile

likedislike
CANN-robot
CANN-robot成员2025年12月24日进行代码检视2
build.sh
已过期
@@ -752,6 +752,9 @@ checkopts() {
752752 ENABLE_PACKAGE=TRUE
753753 ENABLE_BINARY=FALSE
754754 fi
755+ if [[ "$COMPUTE_UNIT" == "ascend950" ]]; then
CANN-robot
CANN-robot2025年12月24日评论:

代码逻辑和结构: 新增的COMPUTE_UNIT映射逻辑存在潜在问题:1) 映射规则过于简单,仅检查字符串完全相等,可能导致误匹配(如'ascend950b'也会被映射);2) 映射关系硬编码在脚本中,缺乏可维护性;3) 映射逻辑放置在check_param调用之前,但check_param函数可能依赖COMPUTE_UNIT的值进行验证。

问题类型: 代码逻辑和结构
文件路径: build.sh
行号: 755
问题代码:

  if [[ "$COMPUTE_UNIT" == "ascend950" ]]; then
    COMPUTE_UNIT="ascend910_95"
  fi

修改建议:

建议:1) 将映射逻辑移到check_param函数之后,确保所有参数验证完成后再进行转换;2) 使用更精确的匹配方式,如[[ "$COMPUTE_UNIT" = "ascend950" ]];3) 考虑将映射关系提取为配置数组,便于维护和扩展。修改示例:
  # 在check_param之后添加映射逻辑
  if [[ "$COMPUTE_UNIT" = "ascend950" ]]; then
    COMPUTE_UNIT="ascend910_95"
    echo "[INFO] Mapping ascend950 to ascend910_95"
  fi

此评论由代码审查工具自动生成

likedislike
System
系统消息系统
2025年12月24日 评论:

changed this line on 02730f84 view diff detail

此处折叠了45条消息 查看更多
chenqi317成员
2025年12月25日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
2025年12月25日 添加了label:lgtmapproved
CANN-robot
CANN-robot成员
2025年12月25日 评论:

Review Guide

This Pull-Request Passes Review.
Committers who writed a comment of /approve are: chenqi317.
Reviewers who writed a comment of /lgtm are: fanqirui, chenqi317.

likedislike
CANN-robotCANN-robot成员
2025年12月25日 合入了pull request
liuyufanliuyufan成员
1月29日 修改了pull request 的描述