Pull Request已成功合入, 合并人@CANN-robot
(感谢 dongfei 的贡献)变更摘要
本 PR 旨在新增 ascend350 平台的配置支持:在构建脚本的可支持计算单元列表与单元测试桩代码的平台枚举中补充 ascend350,并让示例构建逻辑按 arch35 架构目录查找该平台的示例文件,使其获得与 ascend950 一致的处理路径。改动同时包含少量格式整理,不涉及业务逻辑的新增接口或数据结构变更。
主要改动
- 构建脚本支持列表新增
ascend350: 在build.sh的SUPPORT_COMPUTE_UNIT_SHORT数组中新增一个"ascend350"条目(该列表随后会按字符串长度从长到短排序以支持前缀匹配)。 build_example()新增ascend350分支: 在build.sh的示例查找逻辑中新增if [[ "$COMPUTE_UNIT" == "ascend350" ]]分支,与ascend950一致地从*/${OP_NAME}/examples/arch35/${pattern}*.cpp路径下匹配示例文件。SocVersion枚举新增ASCEND350: 在tests/ut/op_api/stub/opdev/platform.h的SocVersion枚举中新增ASCEND350枚举值,使桩代码支持该平台的版本标识。platform.h代码风格整理: 对platform.h进行格式化调整,包括指针/引用写法统一(如fe::PlatFormInfos*、PlatformInfo&)、NpuArch枚举合并为单行、许可证注释换行及中文注释空格修正,无逻辑变更。


Hi @ASCEND222, welcome to submitting your first PR to ops-ras!
PR Merge Steps
1. CLA Signing
If the current PR label includes cann-cla/yes, it means you have signed the CLA and can proceed to the next step. If the label includes cann-cla/no, please sign the CLA first. If you have any questions, please refer to the FAQ.
2. CI Check
Please comment /compile to trigger the CI pipeline check. If the CI run is successful, the PR will be tagged with ci-pipeline-passed and you can proceed to the next step. If the CI run fails, the PR will be tagged with ci-pipeline-failed, please check the CI logs to fix the issues in the PR. If you have any questions, please refer to the FAQ.
3. Code Review
After CI passes, please refer to the PR Approval Progress and proactively @ the committers in the table to review the code. After approval, committers will comment /lgtm and /approve. Once the lgtm and approved labels are successfully added, the PR will be merged automatically.


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 |
|---|---|---|
| repo-cann/ops-ras | ✅ 冯彤, 顾宝成 (2/2) | ✅ 冯彤 (1/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. 👍


/lgtm


compile


流水线任务触发成功
任务链接 [7df1281939e445f4a5753df8e8bebc1b][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> |
[2026-09-05 10:23:05] CI执行结束


流水线任务触发成功
任务链接 [6bd399d2600b41b2a427de4aa76cb263][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| API_Check | ✅ SUCCESS | >>>>> |
[2026-09-05 10:24:58] CI执行结束


描述
add ascend350 config
关联的Issue
https://gitcode.com/cann/ops-ras/issues/28
测试
文档更新
类型标签