已合并
refactor: flatten add_custom structure in parallel_ops_package #1603
jianwei10创建于 4月14日
refactor: flatten add_custom structure in parallel_ops_package #1603
已合并
jianwei10创建于 4月14日
jianwei10
jianwei10成员
4月14日

描述

修改 add_custom算子目录结构为扁平结构

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 jianwei10 的贡献)
jianwei10jianwei10成员
4月14日 创建了 pull request,commit 952a2b63
CANN-robot
CANN-robot成员
4月14日 评论:

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
examples YANXI_ZHAO, 诸葛洵 (2/2) YANXI_ZHAO (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
jianwei10jianwei10成员
4月14日 修改了pull request 的描述
此处折叠了14条事件消息 查看更多
jianwei10jianwei10成员
4月14日 update merge request[project id: 8547062, iid: 1603, commit_id: a56da6982753ecbb29286963c2b56d9eaa1ba585] virtual merging success
jianwei10
jianwei10成员
4月14日 评论:

compile

likedislike
CANN-robotCANN-robot成员
4月14日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
4月14日 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
codecheck ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>>
StaticCheck_codespell_check ⚠️ WARNING >>>>>
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_codestyle ⚠️ WARNING
UT_Test_3 ✅ SUCCESS
UT_Test_2 ✅ SUCCESS
UT_Test_1 ✅ SUCCESS
UT_Test ✅ SUCCESS
API_Check ✅ SUCCESS >>>>>
UT_Test_report ✅ SUCCESS >>>>>

[2026-04-14 20:23:59]    CI执行结束

likedislike
CANN-robotCANN-robot成员
4月14日 添加了label:api-check-pass
CANN-robotCANN-robot成员
4月14日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
4月14日 添加了label:ci-pipeline-passed
jianwei10
jianwei10成员4月14日进行代码检视1
examples/01_simd_cpp_api/02_features/00_compilation/parallel_ops_package/README.md
@@ -27,20 +27,9 @@ parallel_ops_package
2727├── README.md
2828├── add_custom
2929│ ├── CMakeLists.txt
30-│ ├── framework
31-├── CMakeLists.txt
32-└── tf_plugin
33-│ │ ├── CMakeLists.txt
34-│ │ └── tensorflow_add_custom_plugin.cc
35-│ ├── op_host
36-│ │ ├── CMakeLists.txt
37-│ │ └── add_custom
38-│ │ └── add_custom_host.cpp
39-│ └── op_kernel
40-│ ├── CMakeLists.txt
41-│ └── add_custom
42-│ ├── add_custom_kernel.cpp
43-│ └── add_custom_tiling.h
30+│ ├── add_custom_host.cpp
31+│ ├── add_custom_kernel.cpp
32+│ └── add_custom_tiling.h
4433└── leaky_relu_custom
4534 ├── CMakeLists.txt
4635 ├── framework
@@ -61,19 +50,20 @@ parallel_ops_package
6150 
6251## 样例描述
6352 
64-`parallel_ops_package``custom_op` 使用相同的 Add/LeakyRelu 样例描述,本文不重复维护,请参考:
jianwei10
jianwei104月14日评论:

这里写“Add/LeakyRelu 与 custom_op 使用相同样例描述”,但本 PR 已将 add_custom 改成扁平结构并删除 framework/tf_plugin、op_host/op_kernel 子工程,和 custom_op 的工程组织已经不一致。建议拆分成两段说明(add_custom 与 leaky_relu_custom 分开描述),避免读者按 custom_op 路径查找时产生误导。

likedislike
jianwei10
jianwei10成员4月14日进行代码检视2
examples/01_simd_cpp_api/02_features/00_compilation/parallel_ops_package/add_custom/CMakeLists.txt
已过期
@@ -47,0 +36,4 @@
36+)
37+ 
38+npu_op_kernel_library(ascendc_kernels
39+ SRC_BASE ${CMAKE_SOURCE_DIR}/
jianwei10
jianwei104月14日评论:

这里 SRC_BASE 使用 CMAKE_SOURCE_DIR,在当前 ExternalProject 场景下能工作,但如果后续把该目录作为子目录引入(add_subdirectory)时,CMAKE_SOURCE_DIR 会指向顶层工程,导致 kernel 源码相对路径解析不稳定。建议改为 CMAKE_CURRENT_SOURCE_DIR,与 add_custom 目录绑定更稳妥。

likedislike
System
系统消息系统
4月14日 评论:

changed this line on c04b0310 view diff detail

jianwei10jianwei10成员
4月14日 update merge request[project id: 8547062, iid: 1603, commit_id: 53493772df80a6f67386ed99e2b1018621c07907] virtual merging success
jianwei10jianwei10成员
4月14日 强制推送  1 个提交:c04b0310-refactor: flatten add_custom structure in parallel_ops_package
jianwei10jianwei10成员
4月14日 update merge request[project id: 8547062, iid: 1603, commit_id: e079c37b17091baa1f51ff83a182f80b32b1d995] virtual merging success
CANN-robotCANN-robot成员
4月14日 删除了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
4月14日 评论:

Notification

This pull request source branch has changed, so removes the following label(s): ci-pipeline-passed.

likedislike
jianwei10jianwei10成员
4月14日 解决了最后一个问题
jianwei10
jianwei10成员
4月14日 评论:

compile

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

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

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
codecheck ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>>
StaticCheck_codespell_check ⚠️ WARNING >>>>>
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_codestyle ⚠️ WARNING
UT_Test_3 ✅ SUCCESS
UT_Test_2 ✅ SUCCESS
UT_Test_1 ✅ SUCCESS
UT_Test ✅ SUCCESS
API_Check ✅ SUCCESS >>>>>
UT_Test_report ✅ SUCCESS >>>>>

[2026-04-14 21:01:32]    CI执行结束

likedislike
CANN-robotCANN-robot成员
4月14日 添加了label:api-check-pass
CANN-robotCANN-robot成员
4月14日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
4月14日 添加了label:ci-pipeline-passed
YYANXI_ZHAO成员
4月15日 通过审查
YYANXI_ZHAO成员
4月15日 通过了评审
YANXI_ZHAO成员
4月15日 评论:

/lgtm

likedislike
YANXI_ZHAO成员
4月15日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
4月15日 添加了label:approved
zhugexun_sjtu
zhugexun_sjtu成员
4月15日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
4月15日 添加了label:lgtm
CANN-robot
CANN-robot成员
4月15日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: YANXI_ZHAO.
Reviewers who wrote a comment of /lgtm are: YANXI_ZHAO, 诸葛洵.

likedislike
CANN-robotCANN-robot成员
4月15日 合入了pull request