已开启
gmm support ascend350 #10843
gmm support ascend350 #10843
已开启
马琦钧创建于 1 天前
马琦钧
马琦钧成员
1 天前

描述

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

测试

本地编译验证中。

类型标签

likedislike
合并受阻
马琦钧马琦钧成员
1 天前 创建了 pull request,commit e7edb9a8
atomgit-bot
atomgit-bot
1 天前 评论:

变更摘要

本 PR 为 gmm 模块算子适配 ascend350 平台(复用 ascend950 的 arch35 实现),涉及 GroupedMatmulGroupedMatmulAddGroupedMatmulActivationQuantGroupedMatmulFinalizeRoutingGroupedMatmulSwigluQuantV2QuantGroupedMatmulInplaceAdd 6 个算子:各算子的 op_host 定义文件新增 ascend350 的 AICore 配置并复用 ascend950 配置;infershapegrouped_matmul_transpose_fusion_pass 的 DAV_3510 平台判断(GmmDavidSupportSocsoc_version 匹配、CheckPlatformIsDav3510ForGmm)均扩展覆盖 Ascend350;此外 grouped_matmulgrouped_matmul_addquant_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.cppgrouped_matmul_swiglu_quant_v2_infershape.cppGmmDavidSupportSoc 扩展为 {"Ascend950", "Ascend350"}CheckFunctionParamsForShapeCheckFunctionParamsForDtypesoc_version 匹配条件增加 "350",命中时归入 PlatformID::ASCEND950 分支校验。
  • transpose fusion pass 平台判断扩展: grouped_matmul_transpose_fusion_pass.cpp 新增常量 kDav3510ShortSocVersion350(值为 Ascend350),CheckPlatformIsDav3510ForGmm() 在原有 Ascend950 判断基础上增加对 Ascend350 的匹配,使 fusion pass 在 ascend350 上同样生效。
  • op_host 编译选项补充: grouped_matmulgrouped_matmul_addquant_grouped_matmul_inplace_add 的 op_host CMakeLists 增加 Ascend350_355e 编译选项,支撑对应算子在 ascend350 上的构建。
likedislike
CANN-robotCANN-robot成员
1 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
1 天前 评论:

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 /approve or /lgtm
  • Commenting /approve implies 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. 👍

likedislike
CANN-robotCANN-robot成员
1 天前 将chenkang30,juyangokok,monologue815,chaotang233,wuyi_huawei,chen-linxin4,jiang-lirui,Allan_Yu,tang-lei01,liudan12,shi-rui,cc-z,kknan,wenxin_fight,mabing1118,wangyongguang设为评审人
此处折叠了6条事件消息 查看更多
CANN-robotCANN-robot成员
1 天前 添加了label:cann-cla/yes
马琦钧
马琦钧成员
20 小时前 评论:

compile

likedislike
马琦钧马琦钧成员
20 小时前 update merge request[project id: 7673863, iid: 10843, commit_id: 97a12937b4103f4e60b09d75b0041df6e8f8ec46] virtual merging success
CANN-robotCANN-robot成员
20 小时前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
20 小时前 评论:

流水线任务触发成功
任务链接 [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 >>>>>
likedislike
CANN-robot
CANN-robot成员
20 小时前 评论:

流水线任务触发成功
任务链接 [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 >>>>> >>>>>
likedislike
CANN-robotCANN-robot成员
19 小时前 添加了label:api-check-pass
CANN-robotCANN-robot成员
19 小时前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
19 小时前 添加了label:ci-pipeline-failed