已合并
fix: update bucketize example and avg pool doc #7852
zhaowenrui创建于 7月23日
fix: update bucketize example and avg pool doc #7852
已合并
zhaowenrui创建于 7月23日
zhaowenrui
zhaowenrui
7月23日

描述

本次修改包含两处迁仓检视整改:

  1. 将 AvgPool1DAvgMatrix 的 proto 输入 format 说明补全为实现实际支持的 NCHW/NHWC/NC1HWC0,避免资料约束描述不完整。
  2. 删除 Bucketize GEIR 示例中未使用的 kExpectedBucket 常量,清理冗余代码。

关联的Issue

关联 Issue:https://gitcode.com/cann/ops-nn/issues/4264

测试

  • 执行 pre-commit run --files index/bucketize/examples/test_geir_bucketize.cpp pooling/avg_pool1d_avg_matrix/op_graph/avg_pool1d_avg_matrix_proto.h,结果通过。
  • 修改 format 表达后,执行 pre-commit run --files pooling/avg_pool1d_avg_matrix/op_graph/avg_pool1d_avg_matrix_proto.h,结果通过。
  • 执行 bash build.sh --pkg --ops=bucketize --vendor_name=bucketize -j8,自定义包构建通过。
  • 执行 ./build_out/cann-ops-nn-bucketize_linux-aarch64.run --force,自定义包安装通过。
  • 设置 ASCEND_CUSTOM_OPP_PATH=/home/developer/Ascend/cann-9.2.0/opp/vendors/bucketize_nn 后,执行 bash build.sh --run_example bucketize graph cust --vendor_name=bucketize,结果通过。
  • 日志中确认自定义 AICPU 路径:出现 CUSTAICPUKernel、libnn_aicpu_kernels.so 和 InitAicpuTask node[bucketize]。

文档更新

更新 pooling/avg_pool1d_avg_matrix/op_graph/avg_pool1d_avg_matrix_proto.h 中的 format 说明。

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 zhaowenrui 的贡献)
zhaowenruizhaowenrui
7月23日 创建了 pull request,commit 3b6f0363
atomgit-bot
atomgit-bot
7月23日 评论:

变更摘要

此 PR 主要修复两个小问题:清理 test_geir_bucketize.cpp 示例中未使用的常量,以及更正 avg_pool1d_avg_matrix_proto.h 中算子输入格式的文档描述。

主要改动

  • 移除 Bucketize 示例中未使用的常量: 在 test_geir_bucketize.cpp 中删除了 constexpr int32_t kExpectedBucket = 1;,清理了无用代码。
  • 修正 AvgPool1D 算子文档的输入格式描述: 在 avg_pool1d_avg_matrix_proto.h 的注释中,将格式从 NHWC/NCHW 更新为 NCHW, NHWC, or NC1HWC0,新增了对 NC1HWC0 格式的说明,同时修复了句点后缺少空格的问题。
likedislike
不准确?
atomgit-bot
atomgit-bot
7月23日 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
7月23日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
7月23日 评论:

CLA Signature Pass

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

likedislike
CANN-robot
CANN-robot成员
7月23日 评论:

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
*/*/op_graph/*_proto.h ✅ 汤磊, 曾娟 (2/2) ✅ 汤磊 (1/1)
index ✅ 曾娟, 唐燕峰 (2/2) ✅ 唐燕峰 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
7月23日 将zengjuan,chenfeng61,kevin_huang1234,FelixTang7,crystalhu,yangyang016,fanqirui,su-yueming,tang-lei01,chenqi317,wang-xing001,liubo75,tangweiwei2,wangyongguang设为评审人
此处折叠了7条事件消息 查看更多
zhaowenruizhaowenrui
7月23日 修改了pull request 的描述
zhaowenrui
zhaowenrui
7月23日 评论:

compile

likedislike
zhaowenruizhaowenrui
7月23日 预合并成功(commit_id: c637a1bcee60a69abe740862a954b15c79b5e330)
CANN-robotCANN-robot成员
7月23日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
7月23日 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_9030_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_harmony-infer-chs-nn ✅ SUCCESS
UT_Test_harmony-infer-chs-nn-1 ✅ SUCCESS
UT_Test_report_lcov ⚠️ WARNING >>>>>

[2026-07-23 14:47:22]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
7月23日 评论:

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

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_style ✅ SUCCESS >>>>>
codecheck_precommit ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>

[2026-07-23 14:35:12]    CI执行结束

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

/lgtm

likedislike
FelixTang7成员
7月23日 评论:

/lgtm
/approve

likedislike
tang-lei01成员
7月23日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
7月23日 添加了label:lgtmapproved
CANN-robotCANN-robot成员
7月23日 关闭了关联的issue
CANN-robotCANN-robot成员
7月23日 合入了pull request