已合并
[Bugfix] Use RINT cast in experimental sqrt #2848
[Bugfix] Use RINT cast in experimental sqrt #2848
已合并
Robell创建于 5月20日
Robell
5月20日

Fixes #1505

修改内容

  • 将 experimental/math/sqrt 内核中非 float32 路径的结果回 cast 舍入模式从 CAST_CEIL 改为 CAST_RINT
  • 对变更文件执行 clang-format。

本地验证

  • git diff --check:通过。
  • clang-format --dry-run --Werror experimental/math/sqrt/op_kernel/sqrt.h:通过。
  • Select-String 确认目标位置已使用 CAST_RINT

说明

  • 本地缺少 Ascend/CANN SDK 与硬件环境,未执行 op_kernel 编译和精度 UT,已触发 GitCode CI。
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 Robell 的贡献)
RRobell
5月20日 创建了 pull request,commit 5e0a1952
RRobell
5月20日 关联了issue:[Bug-Report|缺陷反馈]: experimental/math/sqrt 算子内核对非float32类型使用了错误的Cast舍入模式(CAST_CEIL应为CAST_RINT)
Robell
5月20日 评论:

/check-cla

likedislike
Robell
5月20日 评论:

compile

likedislike
Robell
5月20日 评论:

测试结果:n- 已执行 git diff --check,通过。n- 已执行 clang-format --dry-run --Werror experimental/math/sqrt/op_kernel/sqrt.h,通过。n- 已用 Select-String 确认目标位置已使用 CAST_RINT。n- 本地缺少 Ascend/CANN SDK 与硬件环境,未执行 op_kernel 编译和精度 UT;已触发 GitCode CI。

likedislike
RRobell
5月20日 update merge request[project id: 7649531, iid: 2848, commit_id: 5ca8b5da25079e1a399694d5dbb2a9834a71f746] virtual merging success
CANN-robotCANN-robot成员
5月20日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
5月20日 评论:

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
experimental 周奇龙, 宋凯 (2/2) 周奇龙, 宋凯 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
5月20日 将FelixTang7,yu-xinjie62,zhou-qilong,wangrui_,wei-peng-1991,renruhai,su-yueming,zhajianqing123,rxtfeng,luowen203_gg123,loov1,zhangzijie,jia0liang,chenqi317,liu-wei,LiuXinxin23,fullt,LiWei79,songkai111,zhangyuxiang0119,demoauguste,llimwang,gubaocheng设为评审人
CANN-robotCANN-robot成员
5月20日 将FelixTang7,yu-xinjie62,zhou-qilong,wangrui_,wei-peng-1991,renruhai,su-yueming,zhajianqing123,rxtfeng,luowen203_gg123,loov1,zhangzijie,jia0liang,chenqi317,liu-wei,LiuXinxin23,fullt,LiWei79,songkai111,zhangyuxiang0119,demoauguste,llimwang,gubaocheng设为审查人
CANN-robotCANN-robot成员
5月20日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
5月20日 评论:

流水线任务触发成功
任务链接 [1d633f3e4b7f408ba6d2aacc6d3094d8][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_A5_ubuntu24 ✅ SUCCESS >>>>>
harmony-infer ✅ SUCCESS
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ✅ SUCCESS >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
UT_Test_experimental ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>

[2026-05-20 16:17:48]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
5月20日 评论:

流水线任务触发成功
任务链接 [6070707fd276496bba5a7c7ff55d8840][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ SUCCESS
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_codestyle ⚠️ WARNING
codecheck_precommit ✅ SUCCESS >>>>>

[2026-05-20 16:15:35]    CI执行结束

likedislike
CANN-robotCANN-robot成员
5月20日 添加了label:api-check-pass
CANN-robotCANN-robot成员
5月20日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
5月20日 添加了label:ci-pipeline-passed
songkai111成员
5月28日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
5月28日 添加了label:approved
sunday成员
5月28日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
5月28日 添加了label:lgtm
CANN-robotCANN-robot成员
5月28日 删除了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
5月28日 评论:

The following label is not ready.

ci-pipeline-passed: The ci-pipeline-passed label is expired. Please compile again.

likedislike
Robell
5月28日 评论:

compile

likedislike
RRobell
5月28日 update merge request[project id: 7649531, iid: 2848, commit_id: 3cb1d444045888c77ff3b4463e551b9ceb1898a5] virtual merging success
CANN-robotCANN-robot成员
5月28日 删除了label:api-check-pass
CANN-robotCANN-robot成员
5月28日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
5月28日 评论:

流水线任务触发成功
任务链接 [9eea1a713ae2442fab284494405ccf35][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_harmony-infer ✅ SUCCESS >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
UT_Test_experimental ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>

[2026-05-28 21:19:46]    CI执行结束

likedislike
CANN-robotCANN-robot成员
5月28日 添加了label:api-check-pass
CANN-robotCANN-robot成员
5月28日 删除了label:api-check-pass
CANN-robot
CANN-robot成员
5月28日 评论:

流水线任务触发成功
任务链接 [4b1e6f9061354e19bddda6ba911086ee][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ SUCCESS
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_codestyle ✅ SUCCESS >>>>>
codecheck_precommit ✅ SUCCESS >>>>> >>>>>

[2026-05-28 21:43:59]    CI执行结束

likedislike
CANN-robotCANN-robot成员
5月28日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
5月28日 添加了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
5月28日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: 周奇龙, 宋凯.
Reviewers who wrote a comment of /lgtm are: 周奇龙, 宋凯.

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