已合并
feat: hans_encode/hans_decode独立编译及950编译 #3768
Nythas N创建于 7月3日
feat: hans_encode/hans_decode独立编译及950编译 #3768
已合并
Nythas N创建于 7月3日
Nythas N
Nythas N
7月3日

描述

hans_encode/hans_decode独立编译及950编译

关联的Issue

https://gitcode.com/cann/ops-math/pull/3763

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 Nythas N 的贡献)
Nythas NNythas N
7月3日 创建了 pull request,commit ac6665a9
CANN-robotCANN-robot成员
7月3日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
7月3日 评论:

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 wangrui_, 王永光, 宋恺, 王林木 (4/2) 王永光 (1/1)
math/hans_decode wangrui_, 王林木, 宋恺 (3/2) 宋恺, wangrui_ (2/1)
math/hans_encode wangrui_, 王林木, 宋恺 (3/2) 宋恺, wangrui_ (2/1)
repo-cann/ops-math 宋恺, wangrui_, 王林木 (3/2) wangrui_, 宋恺 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

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

likedislike
Nythas N
Nythas N
7月3日 评论:

compile

likedislike
Nythas NNythas N
7月3日 update merge request[project id: 7649531, iid: 3768, commit_id: b2c9f8169cb111eb1c55099192f3a7d5cdf9c582] virtual merging success
CANN-robotCANN-robot成员
7月3日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
7月3日 评论:

流水线任务触发成功
任务链接 [d49ec266235b4c2187ca9063c44d8edb][流水线指导]

任务名称状态日志下载链接
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_harmony-infer ❌ FAILED >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_harmony-infer-chs-math ✅ SUCCESS >>>>>
Compile_kirin-harmony-infer-chs-math-1 ✅ SUCCESS >>>>>
likedislike
CANN-robot
CANN-robot成员
7月3日 评论:

流水线任务触发成功
任务链接 [bcffc6740c2249b6978627464907ff9d][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ SUCCESS
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_codestyle ✅ SUCCESS >>>>>
codecheck_precommit ✅ SUCCESS >>>>>

[2026-07-03 12:19:13]    CI执行结束

likedislike
atomgit-bot
atomgit-bot
7月3日 评论:

变更摘要

此 PR 主要将 HansEncodeHansDecode 两个算子从仅支持 ascend910b/ascend910_93 扩展为同时支持 ascend950 平台,实现独立编译及 950 芯片适配。具体包括新增 ascend950 平台的二进制编译配置文件与 simplified_key 配置文件,并在算子定义和全局 AscendC 配置中注册 ascend950 芯片。

主要改动

  • 新增 HansDecodeHansEncode 的 ascend950 二进制配置文件:新增 math/hans_decode/op_host/config/ascend950/hans_decode_binary.jsonmath/hans_encode/op_host/config/ascend950/hans_encode_binary.json,分别定义了 Float32BFloat16Float16 三种数据类型的输入/输出张量及属性(reshuffstatistic),为 ascend950 平台提供算子编译描述。
  • 新增 HansDecodeHansEncode 的 simplified_key 配置文件:新增 hans_decode_simplified_key.inihans_encode_simplified_key.ini,将 defaultsimplified_key_mode 配置为 0,用于 opc 工具在 ascend950 上编译二进制 kernel 时的 key 简化策略。
  • 算子定义中注册 ascend950 芯片:在 hans_decode_def.cpphans_encode_def.cpp 中分别添加 this->AICore().AddConfig("ascend950"),使两个算子的 OP 定义在运行时能够加载 ascend950 对应的配置。
  • AscendC 全局配置中扩展开算子的计算单元:在 scripts/kernel/binary_config/ascendc_config.json 中,将 HansEncodeHansDecodecompute_units["ascend910b", "ascend910_93"] 扩展为 ["ascend910b", "ascend910_93", "ascend950"](文件中两处均修改),使 ascend950 成为正式支持的计算平台。
likedislike
CANN-robotCANN-robot成员
7月3日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
7月3日 添加了label:ci-pipeline-failed
atomgit-bot
atomgit-bot
7月3日 评论:

代码审查

✅ 未发现问题

likedislike
songkai111成员
7月3日 评论:

compile

likedislike
CANN-robotCANN-robot成员
7月3日 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
7月3日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
7月3日 评论:

流水线任务触发成功
任务链接 [525d9074246c4c4eac55f356e2ed19a4][流水线指导]

任务名称状态日志下载链接
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_harmony-infer ✅ SUCCESS >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_harmony-infer-chs-math ✅ SUCCESS >>>>>
Compile_kirin-harmony-infer-chs-math-1 ✅ SUCCESS >>>>>
UT_Test ✅ SUCCESS
UT_Test_experimental ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>

[2026-07-03 14:31:31]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
7月3日 评论:

流水线任务触发成功
任务链接 [a9245835f1b64428a07d43161115cc38][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ SUCCESS
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_codestyle ✅ SUCCESS >>>>>
codecheck_precommit ✅ SUCCESS >>>>>

[2026-07-03 14:27:11]    CI执行结束

likedislike
CANN-robotCANN-robot成员
7月3日 添加了label:api-check-pass
CANN-robotCANN-robot成员
7月3日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
7月3日 添加了label:ci-pipeline-passed
songkai111成员
7月3日 评论:

/lgtm
/approve

likedislike
llimwang成员
7月3日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
7月3日 添加了label:lgtm
RuiWang_成员
7月3日 评论:

/lgtm
/approve

likedislike
wangyongguang成员
7月3日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
7月3日 添加了label:approved
CANN-robotCANN-robot成员
7月3日 合入了pull request