已合并
fix-static-warning #647
fix-static-warning #647
已合并
Cruiter创建于 3月2日
Cruiter
Cruiter成员
3月2日

描述

layernorm tiling接口存在静态告警,log2接口的返回值存在隐式类型转换

关联的Issue

issue #195

测试

不涉及

文档更新

不涉及

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 Cruiter 的贡献)
CruiterCruiter成员
3月2日 创建了 pull request,commit fb596bae
CANN-robot
CANN-robot成员
3月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


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-cann/asc-devkit ookkkkoo1122, wuyang_hw (2/2) ookkkkoo1122 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
CANN-robotCANN-robot成员
3月2日 将zhanghao_0689,yanqingshang,wulinyu,zhuliangying,dengjing_aoe,YeZZzzz1,bluesky901,wqtshg_wt,yangbinhua,gao_dafa,chenyiyuan,xun_zhuge,ookkkkoo1122,bianque,houyuyang,shi_nanxiang,wuyang_hw,ascendhjh,DragonBornHD84,jiangZD设为评审人
CANN-robotCANN-robot成员
3月2日 将zhanghao_0689,yanqingshang,wulinyu,zhuliangying,dengjing_aoe,YeZZzzz1,bluesky901,wqtshg_wt,yangbinhua,gao_dafa,chenyiyuan,xun_zhuge,ookkkkoo1122,bianque,houyuyang,shi_nanxiang,wuyang_hw,ascendhjh,DragonBornHD84,jiangZD设为审查人
CANN-robotCANN-robot成员
3月2日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
3月2日 评论:

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

likedislike
CANN-robot
CANN-robot成员
3月2日 评论:

问题/功能描述

修复LayerNorm算子分片信息计算函数中潜在的整数精度丢失问题。在特定硬件架构下,计算向量寄存器长度以2为底的对数时,直接使用log2函数的结果赋值给uint32_t类型变量,可能导致精度丢失和未定义行为,影响分片计算的正确性。

修改方案描述

通过显式类型转换解决精度问题。在GetLayerNormNDTilingInfo函数中,将log2(rHeadLength)的返回值使用static_cast<uint32_t>进行显式转换后赋值给uint32_t k变量,确保了从浮点数到整数的安全、明确的转换。同时,添加了必要的头文件以保障类型定义。此修改消除了潜在的编译器警告和运行时精度风险,提升了代码的健壮性和可移植性。

likedislike
CruiterCruiter成员
3月2日 update merge request[project id: 8547062, iid: 647, commit_id: 1433f11873fa1f9b4af352d29ecf5ab3c10828fc] virtual merging success
CruiterCruiter成员
3月2日 强制推送  1 个提交:84fbb90d-fix-static-warning
CruiterCruiter成员
3月2日 update merge request[project id: 8547062, iid: 647, commit_id: 11048edbce8b626e8a49051137297fca94e0cf4b] virtual merging success
CANN-robot
CANN-robot成员
3月2日 评论:

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

likedislike
CANN-robot
CANN-robot成员
3月2日 评论:

CLA Signature Pass

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

likedislike
CruiterCruiter成员
3月2日 修改了pull request 的描述
Cruiter
Cruiter成员
3月2日 评论:

/compile

likedislike
CANN-robotCANN-robot成员
3月2日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
3月2日 评论:

流水线任务触发成功 [流水线指导]
任务链接 [7763d5027ba14c8a8e68f83dde5e8a9e]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
API_Check ⚠️ WARNING >>>>>
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ❌ FAILED
Check_Pr ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
UT_Test_3 ⚪ ABORTED
UT_Test_2 ⚪ ABORTED
UT_Test_1 ⚪ ABORTED
UT_Test ⚪ ABORTED
UT_Test_reprot ⚪ ABORTED

[2026-03-02 19:21:59]    CI执行失败

likedislike
CANN-robotCANN-robot成员
3月2日 添加了label:api-check-failed
CANN-robotCANN-robot成员
3月2日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
3月2日 添加了label:ci-pipeline-failed
Cruiter
Cruiter成员
3月2日 评论:

/compile

likedislike
CANN-robotCANN-robot成员
3月2日 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
3月2日 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
3月2日 删除了label:api-check-failed
CANN-robot
CANN-robot成员
3月2日 评论:

流水线任务触发成功 [流水线指导]
任务链接 [5793e34813814333a015b971618221c1]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
API_Check ⚠️ WARNING >>>>>
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
UT_Test_3 ✅ SUCCESS
UT_Test_2 ✅ SUCCESS
UT_Test_1 ✅ SUCCESS
UT_Test ✅ SUCCESS
UT_Test_reprot ✅ SUCCESS

[2026-03-02 19:34:41]    CI执行结束

likedislike
CANN-robotCANN-robot成员
3月2日 添加了label:api-check-failed
CANN-robotCANN-robot成员
3月2日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
3月2日 添加了label:ci-pipeline-passed
ookkkkoo1122成员
3月2日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
3月2日 添加了label:approved
吴洋成员
3月2日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
3月2日 添加了label:lgtm
CANN-robot
CANN-robot成员
3月2日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: ookkkkoo1122.
Reviewers who wrote a comment of /lgtm are: wuyang_hw, ookkkkoo1122.

likedislike
CANN-robotCANN-robot成员
3月2日 合入了pull request