已合并
feat: clipped_swiglu 算子适配 Ascend 950 平台 #5483
feat: clipped_swiglu 算子适配 Ascend 950 平台 #5483
已合并
chenfeng创建于 5月30日
chenfeng
chenfeng成员
5月30日

描述

为 ClippedSwiglu 算子新增 Ascend 950 平台(arch35)适配,主要包括 arch35 Kernel 实现、Tiling 适配、UT 用例及文档更新。

改动方法

  • op_host:新增 ascend950 平台 OpAICoreConfig 注册(clipped_swiglu_def.cpp),支持动态编译、动态 Rank、动态 Shape;重构常量定义,抽取 xDtypexFormat 等 static 变量
  • op_host:新增 arch35 Tiling 实现 clipped_swiglu_tiling_arch35.cpp(447 行)
  • op_hostclipped_swiglu_infershape.cpp 新增未知 Rank 支持(IsUnknownRank 分支)
  • op_kernel:新增 arch35 Kernel 实现(clipped_swiglu_kernel.h,495 行),包含 tiling_data 和 tiling_key
  • apt:新增 clipped_swiglu_apt.cpp,实现 ascend950 平台的内存管理与 kernel 调度
  • config:新增 Ascend 950 二进制配置 clipped_swiglu_binary.json(206 行)
  • ascendc_config.json:ClippedSwiglu 编译目标新增 ascend950,auto_sync 改为按平台差异化配置
  • 文档:README 和 aclnn API 文档中 Ascend 950 支持状态改为 √,更新 group_index(≤1024)和 limit(>0)约束
  • 测试:新增 arch35 Tiling UT 和 Kernel UT 及测试数据生成脚本

关联的Issue

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

测试

  • 新增 test_clipped_swiglu_tiling_arch35.cpp:arch35 Tiling 单元测试
  • 新增 test_clipped_swiglu_arch35.cpp:arch35 Kernel 单元测试
  • 新增 gen_data.py:arch35 测试数据生成脚本

文档更新

  • 更新 README.md:Ascend 950 支持状态改为 √,补充约束说明
  • 更新 docs/aclnnClippedSwiglu.md:Ascend 950 支持状态改为 √,更新参数约束

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 chenfeng 的贡献)
chenfengchenfeng成员
5月30日 创建了 pull request,commit 092cecfa
CANN-robotCANN-robot成员
5月30日 添加了label:cann-cla/no
CANN-robot
CANN-robot成员
5月30日 评论:

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
*/*/README.md 陈娇, 杨阳, 唐玮玮 (3/2) 陈娇 (1/1)
*/*/docs/acl*.md 陈娇, 唐玮玮, 杨阳 (3/2) 陈娇 (1/1)
*/*/op_host/*_def.cpp 汤磊, 杨阳, 唐玮玮 (3/2) 汤磊 (1/1)
activation 杨阳, 章武, 查建青, 陈昊文, 唐玮玮 (5/2) 陈昊文, 唐玮玮 (2/1)
scripts 杨阳, 唐玮玮 (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

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

likedislike
chenfeng
chenfeng成员
5月30日 评论:

compile

likedislike
chenfengchenfeng成员
5月30日 update merge request[project id: 7665709, iid: 5483, commit_id: 20071994e106cad0c9cae39f73190b5903370ba1] virtual merging success
此处折叠了68条消息 查看更多
tangweiwei2成员
6月1日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6月1日 添加了label:lgtm
CANN-robotCANN-robot成员
6月1日 关闭了关联的issue
CANN-robotCANN-robot成员
6月1日 合入了pull request
CANN-robot
CANN-robot成员
6月1日 评论:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike