已合并
strided_slice算子example补充 #595
hawdonz创建于 2025年12月30日
strided_slice算子example补充 #595
已合并
hawdonz创建于 2025年12月30日
hawdonz
hawdonz
2025年12月30日

描述

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 hawdonz 的贡献)
CANN-robot
CANN-robot成员
2025年12月30日 评论:

Thank your for your pull-request.

The full list of commands accepted by me can be found at here.

You can get sig-info at here

likedislike
CANN-robot
CANN-robot成员
2025年12月30日 评论:

以下是根据您提交的修改文件推荐的Reviewer和Committer序列,需各模块评审通过后方可合入

Module List Reviewers Committers
conversion/strided_slice N/A songkai111, FelixTang7, rxtfeng, zhangyuxiang0119, wangrui_
likedislike
CANN-robotCANN-robot成员
2025年12月30日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
2025年12月30日 评论:

🔵 source code change are detected, tasks labels is removed in this pull request!

likedislike
CANN-robot
CANN-robot成员
2025年12月30日 评论:

CLA Signature Pass

Thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
hawdonz
hawdonz
2025年12月30日 评论:

compile

likedislike
CANN-robot
CANN-robot成员
2025年12月30日 评论:

问题/功能描述

本次PR的核心目标是将一个基于CANN ACL库的低阶算子调用示例,重构并升级为一个基于昇腾GE(Graph Engine)IR接口的完整端到端模型构建与执行示例。它解决了从直接算子API调用向高阶图执行引擎迁移的代码实现问题,旨在展示如何在GE框架下构建、运行并验证一个包含StridedSlice算子的完整计算图流程。

修改方案描述

重构方案彻底摒弃了原有的aclnnSlice直接调用方式,转而全面采用昇腾GE IR API的图模式。具体实现包括:引入GE头文件并初始化运行环境;定义一系列宏函数(如ADD_INPUT)以简化图中算子的输入、输出和属性设置;在CreateOppInGraph函数中构建包含StridedSlice算子及其所有输入(x, begin, end, strides)和掩码属性的计算图;在main函数中,通过创建Session、添加计算图、执行推理,完成数据输入、结果输出与验证,并增加了时间戳日志、错误处理及数据序列化到文件等功能,使示例更完整、更贴近生产实践。

likedislike
CANN-robotCANN-robot成员
2025年12月30日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
2025年12月30日 评论:

流水线任务触发成功,任务链接 [c93389dd7b2b4f82b062a1b1ed225616]

任务名称状态日志下载链接
codecheck ❌ FAILED >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Smoke_A900 ✅ SUCCESS >>>>>
UT_Test ⚪ ABORTED
API_Check ⚪ ABORTED >>>>>

[2025-12-30 22:34:38]    CI执行失败

likedislike
CANN-robot
CANN-robot成员
2025年12月30日 评论:
CANN-robotCANN-robot成员
2025年12月30日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
2025年12月30日 添加了label:ci-pipeline-failed
hawdonzhawdonz
2025年12月30日 修改标题为 “strided_slice算子example补充”,原标题为“strided_slice算子example修正”
hawdonz
hawdonz
2025年12月30日 评论:

compile

likedislike
CANN-robotCANN-robot成员
2025年12月30日 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
2025年12月30日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
2025年12月30日 评论:

流水线任务触发成功,任务链接 [07d1f3a025564d2094a15a87e9458bac]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Smoke_A900 ✅ SUCCESS >>>>>
UT_Test ✅ SUCCESS
API_Check ⚠️ WARNING >>>>>

[2025-12-30 23:06:27]    CI执行结束

likedislike
CANN-robotCANN-robot成员
2025年12月30日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
2025年12月30日 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
2025年12月30日 添加了label:api-check-failed
CANN-robotCANN-robot成员
2025年12月30日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
2025年12月30日 添加了label:ci-pipeline-passed
hawdonzhawdonz
2025年12月30日 关联了issue:[Requirement|需求建议]: 下一代conversion, strided_slice 补充example
RuiWang_成员
2025年12月30日 评论:

/lgtm

likedislike
songkai111成员
2025年12月30日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
2025年12月30日 添加了label:lgtmapproved
CANN-robot
CANN-robot成员
2025年12月30日 评论:

Review Guide

This Pull-Request Passes Review.
Committers who writed a comment of /approve are: songkai111.
Reviewers who writed a comment of /lgtm are: songkai111, wangrui_.

likedislike
CANN-robotCANN-robot成员
2025年12月30日 关闭了关联的issue
CANN-robotCANN-robot成员
2025年12月30日 合入了pull request