Pull Request已成功合入, 合并人@CANN-robot
(感谢 dongfei 的贡献)变更摘要
本 PR 为 Sigmoid 和 MaxPoolV3 两个算子新增 ascend350 平台支持。核心做法是复用已有算子配置:在 sigmoid_def.cpp 与 max_pool_v3_def.cpp 中通过 this->AICore().AddConfig("ascend350", ...) 注册 ascend350 平台(与 ascend950 共用同一份 aicoreConfig),并新增对应平台下的二进制算子配置文件 config/ascend350/sigmoid_binary.json 与 config/ascend350/max_pool_v3_binary.json,声明各数据类型的输入输出匹配规则,使算子可在 ascend350 上完成算子二进制与 Kernel 的匹配。
主要改动
- 注册 ascend350 平台配置:在
activation/sigmoid/op_host/sigmoid_def.cpp和pooling/max_pool_v3/op_host/max_pool_v3_def.cpp中各新增一行this->AICore().AddConfig("ascend350", ...),将 ascend950 的 AICore 配置复用到 ascend350,从而为该平台注册算子支持。 - 新增 Sigmoid 算子配置文件:新增
activation/sigmoid/op_host/config/ascend350/sigmoid_binary.json,为Sigmoid算子声明bfloat16、float16、float32三种 ND 格式输入/输出的二进制 Kernel 匹配条目(shape 均为-2,format_match_mode为FormatAgnostic)。 - 新增 MaxPoolV3 算子配置文件:新增
pooling/max_pool_v3/op_host/config/ascend350/max_pool_v3_binary.json,为MaxPoolV3算子声明float16、bfloat16、float32、int8、int16、int32、int64、uint8、uint16共 9 种 ND 格式数据类型,并列出ksize、strides、padding_mode、pads、data_format、global_pooling、ceil_mode等算子属性的匹配约束。 - 收尾格式修正:
pooling/max_pool_v3/op_host/max_pool_v3_def.cpp末尾补充缺失的换行符(\ No newline at end of file修复),不影响功能逻辑。


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
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| */*/op_host/*_def.cpp | ✅ 汤磊, 王星, 唐玮玮, 陈琦 (4/2) | ✅ 汤磊 (1/1) |
| activation | ✅ 陈琦, 王星, 唐玮玮 (3/2) | ✅ 王星 (1/1) |
| pooling | ✅ 王星, 唐玮玮, 陈琦 (3/2) | ✅ 王星 (1/1) |
| scripts | ✅ 陈琦, 唐玮玮 (2/2) | ✅ 陈琦, 唐玮玮 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
ASCEND222, thanks for your pull request. All authors of the commits have signed the CLA. 👍


描述
sigmoid/max_pool_v3等算子新增ascend350平台支持
关联的Issue
https://gitcode.com/cann/ops-nn/issues/5551
测试
文档更新
类型标签
AI/Agent生成声明