已关闭
[Requirement|需求]: 支持 ascend350 平台的激活类算子与 AscendQuant 算子 #5538
wenqi_wu创建于  24 天前关闭于  15 天前
wenqi_wu
24 天前 创建

Backgroud(背景信息)
为 25 个激活/量化类算子增加 ascend350(arch35)平台支持,使其能在 ascend350 芯片上编译与运行;同时将 6 个 aclnn 接口(aclnnRReluWithNoise/aclnnSigmoidBackward/aclnnSwishBackward/aclnnGeluV2/aclnnBinaryCrossEntropyWithLogitsTargetBackward/aclnnLogSigmoidBackward)的 SocVersion 平台判断重构为 NpuArch 判断。

覆盖算子:AscendQuant/AscendAntiQuant/Quantize、Elu/EluGrad/EluGradV2、FastGelu/FastGeluGrad、Gelu/GeluGrad/GeluV2/GeluGradV2、ReluGrad/ReluGradV2/ReluV2、LeakyReluGrad、SigmoidGrad/SiluGrad、Swish/SwishGrad、HardtanhGrad、Mish/MishGrad、LogSigmoid/LogSigmoidGrad。

Origin(信息来源)
CANN ops-nn 算子库存量算子 ascend350 平台适配任务。

Benefit / Necessity(价值/作用)
补齐激活与量化类算子在 ascend350 平台的适配,复用 arch35 tiling/kernel 实现,扩展算子在昇腾新芯片上的可用性;NpuArch 判断使平台分支逻辑与芯片架构代际解耦,便于后续新平台扩展。

Design(设计方案)

  1. 算子 CMakeLists.txt 增加 ascend350 compute unit 及对应 arch35 tiling 目录;
  2. op_host 定义中追加 this->AICore().AddConfig("ascend350", ...);
  3. 增加 config/ascend350/*_binary.json 二进制配置;
  4. ascendc_config.json 增加 ascend350 的编译选项;
  5. op_api 中 SocVersion 等值/范围判断替换为 GetCurNpuArch() 与 NpuArch::DAV_2201 / IsRegbase 判断。

关联 PR:https://gitcode.com/cann/ops-nn/merge_requests/9834

likedislike
Wwenqi_wu
24 天前 添加了label:requirement
Wwenqi_wu
24 天前 关联了pull request:feat: 增加 ascend350 平台支持(Elu/EluGrad/EluGradV2/FastGelu/FastGeluGrad/Gelu/GeluGrad/AscendQuant)
Wwenqi_wu
24 天前 修改了issue 的描述
wenqi_wu
24 天前 评论:

/assign @wenqi_wu

likedislike
CANN-robotCANN-robot成员
24 天前 将 wenqi_wu 设为负责人
Wwenqi_wu
23 天前 修改了issue 的描述
Wwenqi_wu
20 天前 修改了issue 的描述
CANN-robotCANN-robot成员
15 天前 关闭了 issue
CANN-robotCANN-robot成员
15 天前 添加了label:resolved