已合并
增补 9D+ rank 拦截(InferShape + TilingFunc 双层) #8614
Nerddddddddddd创建于 8月12日
增补 9D+ rank 拦截(InferShape + TilingFunc 双层) #8614
已合并
Nerddddddddddd创建于 8月12日
Nerddddddddddd
Nerddddddddddd成员
8月12日

描述

新增ActULQClampMaxGrad 算子 关于 增补 9D+ rank 拦截(InferShape + TilingFunc 双层)

关联的Issue

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

测试

OBP冒烟 二级冒烟均通过

文档更新

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 Nerddddddddddd 的贡献)
NerdddddddddddNerddddddddddd成员
8月12日 创建了 pull request,commit e69e964f
atomgit-bot
atomgit-bot
8月12日 评论:

变更摘要

此 PR 针对 ActULQClampMaxGrad 算子增补了 9 维及以上 Tensor 的 rank 拦截逻辑,在 InferShape 和 TilingFunc 两个阶段设置双层校验,确保超过 8 维的输入在进入后续逻辑之前被提前拒绝,避免因不支持高维 Tensor 而导致未定义行为。

主要改动

  • InferShape 阶段增加 rank 上限检查:在 act_ulq_clamp_max_grad_infershape.cpp 的 InferShape4ActULQClampMaxGrad 函数中,于三输入 shape 一致性校验之前插入 yGradShape->GetDimNum() > 8 的判断,超过 8 维时记录错误日志并返回 ge::GRAPH_FAILED。
  • TilingFunc 阶段增加 rank 上限检查:在 act_ulq_clamp_max_grad_tiling_arch35.cpp 的 GetShapeAndDtype 函数中,于三输入 rank 一致性校验之后、逐维 shape 比较之前插入 yS.GetDimNum() > 8 的判断,超过 8 维时同样记录错误日志并返回 ge::GRAPH_FAILED。
likedislike
不准确?
atomgit-bot
atomgit-bot
8月12日 评论:

代码审查

✅ 未发现问题

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

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
quant ✅ 王星, 苏跃明 (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

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

likedislike
CANN-robotCANN-robot成员
8月12日 将zengjuan,sxb154714,chenfeng61,chaotang233,crystalhu,yangyang016,fanqirui,su-yueming,zhajianqing123,chenqi317,LinPX,wang-xing001,liubo75,tangweiwei2,wangzitao_leo,xubinglin,liujie12345678,pingchuantang,Chen_HaoWen,liuyang_806设为评审人
CANN-robotCANN-robot成员
8月12日 将sxb154714,chenfeng61,su-yueming,zhajianqing123,LinPX,wang-xing001,wangzitao_leo,xubinglin,liujie12345678,pingchuantang,Chen_HaoWen,liuyang_806设为审查人
NerdddddddddddNerddddddddddd成员
8月12日 修改了pull request 的描述
NerdddddddddddNerddddddddddd成员
8月12日 修改了pull request 的描述
Nerddddddddddd
Nerddddddddddd成员
8月12日 评论:

compile

likedislike
NerdddddddddddNerddddddddddd成员
8月12日 预合并成功(commit_id: 4b3d2420ade05b52c381f0aabeeac653ef0bfae0)
CANN-robotCANN-robot成员
8月12日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
8月12日 评论:

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

任务名称状态日志下载链接
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_harmony-infer-chs-nn ✅ SUCCESS
UT_Test_harmony-infer-chs-nn-1 ✅ SUCCESS
UT_Test_harmony-infer-cpro-nn ✅ SUCCESS
UT_Test_report_lcov ✅ SUCCESS >>>>>

[2026-08-12 16:53:29]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
8月12日 评论:

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

任务名称状态日志下载链接
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 ❌ FAILED >>>>> >>>>>
SCA ✅ SUCCESS >>>>>
likedislike
CANN-robotCANN-robot成员
8月12日 添加了label:api-check-pass
此处折叠了7条事件消息 查看更多
CANN-robotCANN-robot成员
8月12日 添加了label:cann-cla/yes
Nerddddddddddd
Nerddddddddddd成员
8月12日 评论:

compile

likedislike
NerdddddddddddNerddddddddddd成员
8月12日 预合并成功(commit_id: 2a70d9bf2d79aa30e682d2a1760e2812df0cb5f1)
CANN-robotCANN-robot成员
8月12日 删除了label:ci-pipeline-failedapi-check-pass
CANN-robotCANN-robot成员
8月12日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
8月12日 评论:

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

任务名称状态日志下载链接
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-12 18:07:33]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
8月12日 评论:

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

任务名称状态日志下载链接
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-12 17:57:07]    CI执行结束

likedislike
CANN-robotCANN-robot成员
8月12日 添加了label:api-check-pass
CANN-robotCANN-robot成员
8月12日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
8月12日 添加了label:ci-pipeline-passed
wang-xing001成员
8月12日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
8月12日 添加了label:approved
su-yueming成员
8月13日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
8月13日 添加了label:lgtm
CANN-robotCANN-robot成员
8月13日 合入了pull request