已合并
fix: 为foreach手写aclnn算子补充tensor list空元素检查 #9494
luoyufan7创建于 23 天前
fix: 为foreach手写aclnn算子补充tensor list空元素检查 #9494
已合并
luoyufan7创建于 23 天前
luoyufan7
23 天前

描述

在CheckParams中CheckNotNull之后、CheckDtypeValid之前,遍历各个tensor list检查元素是否为nullptr,命中则返回ACLNN_ERR_PARAM_INVALID。

共涉及17个foreach算子,20个文件:

  • aclnn_exclude(10算子/13文件)
  • aclnn V2 hand-write(7算子/7文件)

关联的Issue

  • Refs #5329

测试

  • UT op_api: 62/62 PASSED
  • UT op_kernel: 72/72 PASSED
  • UT op_host tiling: 全部通过
  • Example eager: 16/17通过(foreach_mul_list为基线已有问题)
  • ST (ATK): foreach_lerp_scalar 201/201通过,其余16算子各3/3通过
  • Pre-commit: 全部通过

文档更新

不涉及

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 luoyufan7 的贡献)
Lluoyufan7
23 天前 创建了 pull request,commit b03ab4e6
CANN-robotCANN-robot成员
23 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
23 天前 评论:

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
foreach 陈昊文, 查建青 (2/2) 陈昊文 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
23 天前 将zengjuan,chaotang233,kevin_huang1234,crystalhu,yangyang016,fanqirui,wangrui_,renruhai,su-yueming,zhajianqing123,chenqi317,wang-xing001,liubo75,tangweiwei2,liujie12345678,pingchuantang,Chen_HaoWen,qianzehong设为评审人
CANN-robotCANN-robot成员
23 天前 将kevin_huang1234,wangrui_,renruhai,su-yueming,zhajianqing123,wang-xing001,liujie12345678,pingchuantang,Chen_HaoWen,qianzehong设为审查人
Lluoyufan7
23 天前 修改了pull request 的描述
luoyufan7
23 天前 评论:

compile

likedislike
Lluoyufan7
23 天前 预合并成功(commit_id: 63c63da2861a5d22375b0806a3c04798f9c7425e)
CANN-robotCANN-robot成员
23 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
23 天前 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_9030_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_report_lcov ⚠️ WARNING >>>>>

[2026-08-29 15:25:02]    CI执行结束

likedislike
Lluoyufan7
23 天前 修改了pull request 的描述
CANN-robot
CANN-robot成员
23 天前 评论:

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

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
codecheck_precommit ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
StaticCheck_md ✅ SUCCESS

[2026-08-29 14:29:23]    CI执行结束

likedislike
CANN-robotCANN-robot成员
23 天前 添加了label:api-check-pass
CANN-robotCANN-robot成员
23 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
23 天前 添加了label:ci-pipeline-passed
Chen_HaoWen成员
23 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
23 天前 添加了label:approved
tangweiwei2成员23 天前进行代码检视2
foreach/foreach_add_list/op_host/op_api/aclnn_foreach_add_list.cpp
@@ -1,4 +1,4 @@
11/**
tangweiwei223 天前评论:

[PR描述规范性] PR 类型标签未使用标准模板格式(应用 [x] 勾选 Bug修复/新特性/性能优化/文档更新/其他)。建议按标准模板格式勾选正确类别。

likedislike
luoyufan7
23 天前 评论:

已修改

Lluoyufan7
23 天前 修改了pull request 的描述
Zzhajianqing123成员
23 天前 解决了最后一个问题
zhajianqing123成员
23 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
23 天前 添加了label:lgtm
CANN-robotCANN-robot成员
23 天前 关闭了关联的issue
CANN-robotCANN-robot成员
23 天前 合入了pull request
CANN-robot
CANN-robot成员
23 天前 评论:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike