合并受阻
变更摘要
本 PR 为 gmm 模块算子适配 ascend350 平台(复用 ascend950 的 arch35 实现),涉及 GroupedMatmul、GroupedMatmulAdd、GroupedMatmulActivationQuant、GroupedMatmulFinalizeRouting、GroupedMatmulSwigluQuantV2、QuantGroupedMatmulInplaceAdd 6 个算子:各算子的 op_host 定义文件新增 ascend350 的 AICore 配置并复用 ascend950 配置;infershape 与 grouped_matmul_transpose_fusion_pass 的 DAV_3510 平台判断(GmmDavidSupportSoc、soc_version 匹配、CheckPlatformIsDav3510ForGmm)均扩展覆盖 Ascend350;此外 grouped_matmul、grouped_matmul_add、quant_grouped_matmul_inplace_add 的 op_host CMakeLists 增加 Ascend350_355e 编译选项。ascend350 的公共构建适配(SOC 列表、soc 映射等)由公共 PR 支持,本 PR 仅含算子侧改动。
主要改动
- 算子注册 ascend350 AICore 配置: 6 个算子的
*_def.cpp中均新增this->AICore().AddConfig("ascend350", config950)(或config91095),直接复用 ascend950 的 arch35 实现配置,使这些算子可在 ascend350 上编译运行。 - infershape 平台判断覆盖 Ascend350:
grouped_matmul_infershape.cpp与grouped_matmul_swiglu_quant_v2_infershape.cpp将GmmDavidSupportSoc扩展为{"Ascend950", "Ascend350"};CheckFunctionParamsForShape与CheckFunctionParamsForDtype中soc_version匹配条件增加"350",命中时归入PlatformID::ASCEND950分支校验。 - transpose fusion pass 平台判断扩展:
grouped_matmul_transpose_fusion_pass.cpp新增常量kDav3510ShortSocVersion350(值为Ascend350),CheckPlatformIsDav3510ForGmm()在原有Ascend950判断基础上增加对Ascend350的匹配,使 fusion pass 在 ascend350 上同样生效。 - op_host 编译选项补充:
grouped_matmul、grouped_matmul_add、quant_grouped_matmul_inplace_add的 op_host CMakeLists 增加 Ascend350_355e 编译选项,支撑对应算子在 ascend350 上的构建。


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
⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| */*/op_host/*_def.cpp | ❌ (0/2)(You can also ask: 刘丹, 俞郑中, 黄俊健, 王永光, 汤磊) | ❌ (0/1)(You can also ask: 汤磊, 王永光) |
| gmm | ❌ (0/2)(You can also ask: 唐超, chen-linxin4, 俞郑中, shi-rui, 黄俊健) | ❌ (0/1)(You can also ask: wenxin_fight, shi-rui, 俞郑中, 陈康, chen-linxin4) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
maqijun, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


流水线任务触发成功
任务链接 [cf86456ac3e246258222f2c53e496313][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Pre | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_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_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_9030_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test | ❌ FAILED | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> |


流水线任务触发成功
任务链接 [b471f797fcf94a578ca5c43e4e1c6348][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_style | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_checkpr | ✅ SUCCESS | ||
| codecheck_precommit | ❌ FAILED | >>>>> | >>>>> |


描述
gmm 模块算子适配 ascend350(复用 ascend950 的 arch35 实现),参照 ops-nn !5116 的适配模式。涉及 6 个算子:GroupedMatmul、GroupedMatmulAdd、GroupedMatmulActivationQuant、GroupedMatmulFinalizeRouting、GroupedMatmulSwigluQuantV2、QuantGroupedMatmulInplaceAdd。
每个算子注册 ascend350 的 AICore 配置(复用 ascend950 配置);grouped_matmul / grouped_matmul_add / quant_grouped_matmul_inplace_add 的 op_host CMakeLists 增加 Ascend350_355e 编译选项。
注:ascend350 的公共构建适配(SOC 列表、soc 映射等)由公共 PR 支持,本 PR 仅包含算子侧改动。
关联的Issue
测试
本地编译验证中。
类型标签