已合并
修复SwigluGroup/Quant空Tensor校验失效问题 #9557
taochangmin创建于 8 天前
修复SwigluGroup/Quant空Tensor校验失效问题 #9557
已合并
taochangmin创建于 8 天前
taochangmin
taochangmin
8 天前

描述

由于框架对输出全为空Tensor的场景不会下发kernel执行,导致空Tensor校验失效,开启LaunchWithZeroEleOutputTensors使该场景仍下发执行。

关联的Issue

https://gitcode.com/cann/ops-nn/issues/5363

测试

ut、st测试,冒烟测试

文档更新

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 taochangmin 的贡献)
taochangmintaochangmin
8 天前 创建了 pull request,commit b26f6905
taochangmintaochangmin
8 天前 关联了issue:修复SwigluGroup/Quant空Tensor校验失效问题
atomgit-bot
atomgit-bot
8 天前 评论:

变更摘要

本 PR 修复了 SwigluGroupSwigluGroupQuant 算子在输出全为空 Tensor 场景下校验失效的问题。原因是框架对输出全为空 Tensor 的场景不会下发 kernel 执行,导致原本依赖 kernel 执行的空 Tensor 校验无法生效;通过在这两个算子的定义中调用 AICore().LaunchWithZeroEleOutputTensors(true),使该场景下仍会下发 kernel 执行,从而恢复空 Tensor 校验能力。

主要改动

  • swiglu_group_def.cpp 开启零元素输出下发:在 swiglu_group 算子的定义中新增 this->AICore().LaunchWithZeroEleOutputTensors(true);,使输出全为空 Tensor 时仍下发 kernel 执行,恢复空 Tensor 校验。
  • swiglu_group_quant_def.cpp 开启零元素输出下发:在 swiglu_group_quant 算子的定义中新增 this->AICore().LaunchWithZeroEleOutputTensors(true);,同样解决输出全为空 Tensor 时校验失效的问题。
likedislike
不准确?
atomgit-bot
atomgit-bot
8 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
8 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
8 天前 评论:

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
*/*/op_host/*_def.cpp 汤磊, 钱泽洪 (2/2) 汤磊 (1/1)
activation 钱泽洪, 陈昊文 (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

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

likedislike
CANN-robotCANN-robot成员
8 天前 将zengjuan,chaotang233,crystalhu,yangyang016,fanqirui,tang-lei01,chenqi317,liubo75,tangweiwei2,pingchuantang,wangyongguang设为评审人
CANN-robotCANN-robot成员
8 天前 将tang-lei01,wangyongguang设为审查人
tangweiwei2成员
8 天前 评论:

/lgtm

likedislike
taochangmin
taochangmin
8 天前 评论:

/compile

likedislike
taochangmintaochangmin
8 天前 update merge request[project id: 7665709, iid: 9557, commit_id: 7d2e515b0a3a29618e8be1e89bf6f87641bfd9f4] virtual merging success
CANN-robotCANN-robot成员
8 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
8 天前 评论:

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

任务名称状态日志下载链接
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-31 15:35:47]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
8 天前 评论:

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

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
codecheck_precommit ❌ FAILED >>>>> >>>>>
SCA ✅ SUCCESS >>>>>
StaticCheck_md ✅ SUCCESS
likedislike
CANN-robotCANN-robot成员
8 天前 添加了label:api-check-pass
此处折叠了13条事件消息 查看更多
CANN-robotCANN-robot成员
8 天前 添加了label:cann-cla/yes
taochangmin
taochangmin
8 天前 评论:

/compile

likedislike
taochangmintaochangmin
8 天前 update merge request[project id: 7665709, iid: 9557, commit_id: 05845e7ea4607100c53a1f9811a174c5b683433f] virtual merging success
CANN-robotCANN-robot成员
8 天前 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
8 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
8 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
8 天前 添加了label:ci-pipeline-passed
yuning_chen
yuning_chen成员
7 天前 评论:

您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!

likedislike
tang-lei01成员
7 天前 评论:

/approve

likedislike
qianzehong成员
7 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
7 天前 添加了label:approved
Chen_HaoWen成员
6 天前 评论:

/approve

likedislike
qianzehong成员
6 天前 评论:

/lgtm

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