当前Pull Request已关闭, 关闭人@CANN-robot
变更摘要
本 PR 为 trans_data 算子新增 ascend350 平台支持,参照 cann/ops-nn!5116(matmul 支持 ascend350)及本仓 masked_fill 等算子的适配方式。改动集中在三处:conversion/trans_data/CMakeLists.txt 的 SUPPORT_COMPUTE_UNIT / SUPPORT_TILING_DIR 增加 ascend350(tiling 复用 arch35 目录);conversion/trans_data/op_host/trans_data_def.cpp 的 AICore 注册中为 ascend350 复用 ascend950 的 aicore_config;新增 conversion/trans_data/op_host/config/ascend350/ 下的 trans_data_binary.json 与 trans_data_simplified_key.ini(与 ascend950 保持一致)。验证结果为 build.sh --opkernel --soc=ascend350 --ops=trans_data 编译通过并生成 23 个 Ascend350_355e kernel 二进制。
主要改动
- AICore 配置注册:
conversion/trans_data/op_host/trans_data_def.cpp中新增this->AICore().AddConfig("ascend350", aicore_config);,使 ascend350 复用 ascend950 的 aicore 配置。 - 新增二进制配置: 新增
conversion/trans_data/op_host/config/ascend350/trans_data_binary.json,注册TransData各 kernel 二进制,覆盖int8/uint8/int4/float16/float32/float4_e2m1/float4_e1m2/hifloat8等数据类型以及ND与FRACTAL_NZ、FRACTAL_NZ_C0_16、FRACTAL_NZ_C0_32等格式之间的相互转换。 - 新增 simplified key 配置: 新增
conversion/trans_data/op_host/config/ascend350/trans_data_simplified_key.ini,内容为[TransData] default=0,与 ascend950 保持一致。 - 构建配置支持:
conversion/trans_data/CMakeLists.txt的SUPPORT_COMPUTE_UNIT/SUPPORT_TILING_DIR增加 ascend350 支持,tiling 复用 arch35 目录。


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:approve (requires ≥ 1 person(s) per module)
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| */*/op_host/*_def.cpp | ✅ 汤平川, 张磊 (2/2) | ❌ (0/1)(You can also ask: 王永光, 汤磊) |
| conversion/trans_data | ✅ 汤平川, 张磊 (2/2) | ✅ 汤平川, 张磊 (2/1) |
| repo-cann/ops-math | ✅ 汤平川, 张磊 (2/2) | ✅ 汤平川, 张磊 (2/1) |
💡 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. 👍


https://gitcode.com/cann/ops-math/pull/5560/ 这个 pr 已上库trans_data适配ascend350,本pr关闭


/close


描述
trans_data 算子新增 ascend350 平台支持,参考 cann/ops-nn!5116(matmul support ascend350)及本仓 masked_fill 等算子(!5387)的适配方式:
conversion/trans_data/CMakeLists.txt:SUPPORT_COMPUTE_UNIT/SUPPORT_TILING_DIR增加 ascend350(tiling 复用 arch35 目录)conversion/trans_data/op_host/trans_data_def.cpp:AICore 增加 ascend350 配置,复用 ascend950 的 aicore_configop_host/config/ascend350/trans_data_binary.json、trans_data_simplified_key.ini(与 ascend950 保持一致)scripts/kernel/binary_config/ascendc_config.json:TransData 增加 ascend350 编译单元及编译选项(与 ascend950 保持一致)关联的Issue
#3166
测试
bash build.sh --opkernel --soc=ascend350 --ops=trans_data -j16编译通过,生成 23 个 ascend350(Ascend350_355e)kernel 二进制及 binary_info_config.json,生成的编译脚本中 ascend350 已携带与 ascend950 相同的-mllvm -cce-aicore-dcci-before-kernel-end=false编译选项文档更新
无
类型标签