Pull Request has been successfully merged by CANN-robot.
(Thank you for huang-chuhong's contribution.)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 |
|---|---|---|
| */*/op_host/*_def.cpp | ✅ 汤磊, 蒋礼锐 (2/2) | ✅ 汤磊 (1/1) |
| attention | ✅ 蒋礼锐, zzy__ (2/2) | ✅ 蒋礼锐, zzy__ (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
huang-chuhong, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


compile






流水线任务触发成功
任务链接 [188594808d1a41f3bff28fe0ffad8881][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Pre | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental_950_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental_950_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_classify | ✅ SUCCESS | >>>>> | |
| Compile_harmony-infer-chs-transformer | ✅ SUCCESS | >>>>> | |
| UT_Test | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ⚠️ WARNING | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> | |
| UT_Test_report_lcov | ⚠️ WARNING | >>>>> |
[2026-07-06 17:49:04] CI执行结束


流水线任务触发成功
任务链接 [b27f0fafc30649998257a414c9634e53][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_style | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_checkpr | ✅ SUCCESS | ||
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
[2026-07-06 17:34:20] CI执行结束


变更摘要
此 PR 对 chunk_gated_delta_rule 算子进行架构目录拆分重构,将原本按 stage 划分的共享 kernel 头文件按芯片架构分离到 arch22/(ascend910b)和 arch35/(ascend950)两个子目录,并为 ascend950 新增专用 kernel 入口文件与算子配置,使不同架构可以独立演进差异化实现。
主要改动
-
架构目录拆分:将原有 5 个头文件(
chunk_gated_delta_rule.h、chunk_gated_delta_rule_stage1.h、chunk_gated_delta_rule_stage2.h、chunk_gated_delta_rule_stage3.h、chunk_gated_delta_rule_utils.h)移入op_kernel/arch22/目录,内部#include路径统一改为../chunk_gated_delta_rule_tiling_data.h,保持 ascend910b 原有行为不变。 -
新增 arch35 架构实现:在
op_kernel/arch35/下新增 5 个同名头文件,提供适配 ascend950 的完整实现。其中Stage1采用 AIC/AIV 混合并行架构(KERNEL_TYPE_MIX_AIC_1_2),通过Broadcast+Mul+Exp实现 Gamma 计算、自定义InverseAIV实现对角块求逆等差异化逻辑;Stage2和Stage3同样基于 AIC/AIV 协同模式,与 arch22 的实现结构有明显差异。 -
新增 ascend950 kernel 入口:新增
chunk_gated_delta_rule_apt.cpp,通过#include "arch35/chunk_gated_delta_rule.h"引入 arch35 实现,注册 kernel 函数并采用KERNEL_TYPE_MIX_AIC_1_2任务类型,模板实例化为CGDR<bfloat16_t, float>。 -
算子配置注册 ascend950:在
chunk_gated_delta_rule_def.cpp中新增OpAICoreConfig config_950,设置动态编译/格式/秩/形状支持,并通过ExtendCfgInfo("opFile.value", "chunk_gated_delta_rule_apt")指定 ascend950 使用chunk_gated_delta_rule_apt作为 opFile。 -
已有入口路径更新:
chunk_gated_delta_rule.cpp的 include 从"chunk_gated_delta_rule.h"改为"arch22/chunk_gated_delta_rule.h",使 ascend910b/910_93 继续使用 arch22 实现。


/approve


/approve
/lgtm


/approve


描述
chunk_gated_delta_rule 算子原有 kernel 头文件按 stage 划分,不区分芯片架构,无法支持 ascend950 的差异化实现。本 PR 将 kernel 头文件按架构拆分到 arch22/ 和 arch35/ 目录,并为 ascend950 新增专用 kernel 入口文件和算子配置。
改动
关联的Issue
#3614
测试
类型标签