已合并
支持Div算子在下一代实现 #654
yuhwang创建于 1月4日
支持Div算子在下一代实现 #654
已合并
yuhwang创建于 1月4日
yuhwang
yuhwang
1月4日

描述

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 yuhwang 的贡献)
CANN-robot
CANN-robot成员
1月4日 评论:

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成员
1月4日 评论:

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

Module List Reviewers Committers
math/div N/A loov1, wangrui_, songkai111, FelixTang7, rxtfeng
likedislike
CANN-robotCANN-robot成员
1月4日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
1月4日 评论:

🔵 source code change are detected, tasks labels is removed in this pull request!

likedislike
CANN-robot
CANN-robot成员1月4日进行代码检视1
math/div/op_api/aclnn_div.cpp
@@ -0,0 +124,4 @@
124+ }
125+}
126+ 
127+static bool CheckNotNull(const aclTensor* self, const aclTensor* other, const aclTensor* out)
CANN-robot
CANN-robot1月4日评论:

指针与引用安全: CheckNotNull函数中空指针检查顺序不合理。当前检查顺序是out->other->self,但通常应该按照参数传递顺序或重要性顺序检查。更重要的是,当self或other为空时,函数返回false,但调用者可能无法区分是哪个参数为空,因为错误信息不明确。

问题类型: 指针与引用安全
文件路径: math/div/op_api/aclnn_div.cpp
行号: 127
问题代码:

static bool CheckNotNull(const aclTensor* self, const aclTensor* other, const aclTensor* out)
{
    OP_CHECK_NULL(out, return false);
    OP_CHECK_NULL(other, return false);
    OP_CHECK_NULL(self, return false);
    return true;
}

修改建议:

建议统一检查顺序为self->other->out,与参数顺序一致。同时考虑在OP_CHECK_NULL宏中添加更详细的错误信息,或者使用单独的日志记录哪个参数为空。

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

likedislike
此处折叠了101条消息 查看更多
CANN-robotCANN-robot成员
1月6日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
1月6日 添加了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
1月6日 评论:

Review Guide

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

likedislike
CANN-robotCANN-robot成员
1月6日 关闭了关联的issue
CANN-robotCANN-robot成员
1月6日 合入了pull request