已合并
修复SwigluGroup/Quant文档和空Tensor问题 #8708
taochangmin创建于 21 天前
修复SwigluGroup/Quant文档和空Tensor问题 #8708
已合并
taochangmin创建于 21 天前
taochangmin
taochangmin
21 天前

描述

修复SwigluGroup和SwigluGroupQuant文档、tiling校验和空Tensor问题

关联的Issue

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

测试

ut、st测试

文档更新

activation/swiglu_group/README.md
activation/swiglu_group/docs/aclnnSwigluGroup.md
activation/swiglu_group/docs/torchapi_swiglu_group.md
activation/swiglu_group_quant/README.md
activation/swiglu_group_quant/docs/aclnnSwigluGroupQuant.md
activation/swiglu_group_quant/docs/torchapi_swiglu_group_quant.md

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 taochangmin 的贡献)
taochangmintaochangmin
21 天前 创建了 pull request,commit 3e70c27e
atomgit-bot
atomgit-bot
21 天前 评论:

变更摘要

该 PR 主要针对 SwigluGroup/SwigluGroupQuant 两个算子的文档描述与空 Tensor 处理进行修复:在 tiling 阶段补充输入/输出的维度范围、空 Tensor 与形状一致性校验,同步更新算子原型文档中的约束说明,优化 dtype 错误日志的可读性,并新增对应单元测试。

主要改动

  • 输入维度与空 Tensor 校验增强:在 SwigluGroupTilingSwigluGroupQuantTiling 中新增 xweightgroup_index 的 rank 范围校验(如 x[1, 8]/[2, 8]group_index 必须为 1D),并通过 bs_ <= 0weightElementNum <= 0g_ <= 0 等判断拒绝空 Tensor。
  • 输出形状校验补全CheckOutputInfo 新增 const gert::Shape& xStorageShape 参数,对 yy_scaley_origin 的维度数、各维取值及末维关系进行校验,包括 y 末维应为 d_/2splitD_,以及 MX 模式下 y_scale 末两维应为 [..., ceil(ceil((D/2)/32)/2), 2]
  • 算子文档约束同步更新:更新 swiglu_group_proto.hswiglu_group_quant_proto.h,补充 xweightgroup_indexscale 的 rank、空 Tensor、元素个数及 quant_mode/dst_type/output_origin 等约束说明,并明确各量化模式的输出形状规则。
  • 错误信息可读性优化:将 dtype 相关错误日志由数值编号改为通过 ge::TypeUtils::DataTypeToSerialString 输出字符串,并调整部分提示语以更准确描述校验条件。
  • 单元测试补充:在两个测试文件中新增多组 UT,覆盖非法 x rank、空 x、非法/空 group_index、非法 weight rank,以及非法 yy_scaley_origin 形状等场景。
likedislike
atomgit-bot
atomgit-bot
21 天前 评论:

代码审查

✅ 未发现问题

likedislike
CANN-robotCANN-robot成员
21 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
21 天前 评论:

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.
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
*/*/README.md 陈娇, 汤平川 (2/2) 陈娇 (1/1)
*/*/docs/acl*.md 陈娇, 汤平川 (2/2) 陈娇 (1/1)
*/*/op_graph/*_proto.h 汤磊, 汤平川 (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-robot
CANN-robot成员
21 天前 评论:

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
21 天前 将zengjuan,chaotang233,kevin_huang1234,crystalhu,yangyang016,fanqirui,gitee-duhuiping,renruhai,su-yueming,zhajianqing123,tang-lei01,chenqi317,wang-xing001,liubo75,tangweiwei2,gitcode-chenjiao,liujie12345678,pingchuantang,Chen_HaoWen,zhouwenfang,wangyongguang,wuyao51511,caiwenwen设为评审人
CANN-robotCANN-robot成员
21 天前 将kevin_huang1234,gitee-duhuiping,renruhai,su-yueming,zhajianqing123,tang-lei01,wang-xing001,gitcode-chenjiao,liujie12345678,pingchuantang,Chen_HaoWen,zhouwenfang,wangyongguang,wuyao51511,caiwenwen设为审查人
taochangmin
taochangmin
21 天前 评论:

/compile

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

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

任务名称状态日志下载链接
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 ✅ SUCCESS >>>>>

[2026-08-14 17:17:44]    CI执行结束

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

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

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_precommit ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>

[2026-08-14 17:11:22]    CI执行结束

likedislike
CANN-robotCANN-robot成员
21 天前 添加了label:api-check-pass
此处折叠了6条事件消息 查看更多
CANN-robotCANN-robot成员
18 天前 删除了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
18 天前 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci-pipeline-passed.

likedislike
CANN-robotCANN-robot成员
18 天前 添加了label:cann-cla/yes
此处折叠了9条事件消息 查看更多
CANN-robotCANN-robot成员
16 天前 添加了label:cann-cla/yes
taochangmin
taochangmin
16 天前 评论:

/compile

likedislike
taochangmintaochangmin
16 天前 update merge request[project id: 7665709, iid: 8708, commit_id: 11193829b13fa17c880d284ef791be892d19a172] virtual merging success
CANN-robotCANN-robot成员
16 天前 删除了label:api-check-pass
CANN-robotCANN-robot成员
16 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
16 天前 评论:

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

任务名称状态日志下载链接
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 ✅ SUCCESS >>>>>

[2026-08-19 11:42:31]    CI执行结束

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

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

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_precommit ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>

[2026-08-19 11:31:38]    CI执行结束

likedislike
CANN-robotCANN-robot成员
16 天前 添加了label:api-check-pass
CANN-robotCANN-robot成员
16 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
16 天前 添加了label:ci-pipeline-passed
taochangmintaochangmin
15 天前 修改了pull request 的描述
chenjiao成员
15 天前 评论:

/approve

likedislike
TangPC
TangPC成员
15 天前 评论:

/lgtm
/approve

likedislike
qianzehong成员
14 天前 评论:

/lgtm
/approve

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

/approve

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