Merged
fix(circular_pad): 统一2d/3d为单一GEIR算子,加固负padding与索引位宽处理 #6780
wuyanAdd on 19 days ago
fix(circular_pad): 统一2d/3d为单一GEIR算子,加固负padding与索引位宽处理 #6780
Merged
wuyanAdd on 19 days ago
wuyan
wuyanCollaborators
19 days ago

描述

本次 PR 将 CircularPad2d/CircularPad3d 统一为单一 GEIR 算子并加固边界处理,具体如下:

1. 统一 2d/3d 为单一 GEIR 算子

  • 将 CircularPad2d、CircularPad3d 合并为单一 GEIR 算子 circular_pad,通过 paddings 长度(4 为 2d、6 为 3d)区分模式。
  • 参数统一为 x(输入,shape 3–5 维)、paddings(长度 4/6)、y(输出);同步更新 README 与 aclnnCircularPad2d/3d 文档、op_graph/circular_pad_proto.h、op_api 头文件。

2. 加固负 padding 与索引位宽处理

  • 支持负 padding 裁剪语义(负值裁剪、正值循环填充),infer shape/tiling 增加 int64 溢出与每侧越界校验。
  • kernel(circular_pad_simt.h、circular_pad_tiling_data.h)修复 SIMT 索引位宽(uint32/uint64)切换路径。
  • 修复示例 test_aclnn_circular_pad.cpp 中 executor 重复释放导致的 double free。

3. 修正 golden 浮点精度为位级精确比对

  • tests/assets/golden.py 的 float32/float16/bfloat16 比对标准由 cross_check(L1) 改为 binary_equal,对齐 spec 的 bitwise_equal(rtol=0/atol=0)。

4. 补充 ST 用例

  • kernel 与 aclnn 各补充 5 条功能用例(tests/st/{kernel,aclnn})。

关联的Issue

测试

  • UT:test_circular_pad_tiling_arch35.cpp 覆盖负 padding 与索引位宽切分。
  • ST:补充 kernel/aclnn 各 5 条功能用例,覆盖 float16/bfloat16/float32/int8/int32。
  • 精度:golden 采用位级精确比对(bitwise_equal)。

文档更新

  • conversion/circular_pad/README.md
  • conversion/circular_pad/docs/aclnnCircularPad2d.md
  • conversion/circular_pad/docs/aclnnCircularPad3d.md

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for wuyan's contribution.)
wuyanwuyanCollaborators
19 days ago Created pull request, commit fb376316
CANN-robotCANN-robotCollaborators
19 days ago Added label: cann-cla/no
CANN-robot
CANN-robotCollaborators
19 days ago Comments:

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
*/*/README.md ✅ 陈娇, zhanw_coding (2/2) ✅ 陈娇 (1/1)
*/*/docs/acl*.md ✅ zhanw_coding, 陈娇 (2/2) ✅ 陈娇 (1/1)
*/*/op_api/*.h ✅ 汤磊, zhanw_coding (2/2) ✅ 汤磊 (1/1)
*/*/op_graph/*_proto.h ✅ 汤磊, zhanw_coding (2/2) ✅ 汤磊 (1/1)
conversion/circular_pad ✅ zhanw_coding, andong_hw (2/2) ✅ zhanw_coding, andong_hw (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
19 days ago Set FelixTang7,yue-ma,zhou-qilong,gitee-duhuiping,wangrui_,rxtfeng,loov1,tang-lei01,zhangzijie,jia0liang,zl_hw,songkai111,gitcode-chenjiao,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,wangyongguang,fengying555682,xuejinghui,onanfield,zhanw_coding,clinglai0517,caiwenwen,yanglu-1 as approver
CANN-robotCANN-robotCollaborators
19 days ago Set FelixTang7,yue-ma,zhou-qilong,gitee-duhuiping,wangrui_,rxtfeng,loov1,tang-lei01,zhangzijie,zl_hw,songkai111,gitcode-chenjiao,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,wangyongguang,fengying555682,xuejinghui,onanfield,zhanw_coding,clinglai0517,caiwenwen,yanglu-1 as approver
139 messages are collapsed here。 See more
chenjiaoCollaborators
13 days ago Comments:

/approve

likedislike
tang-lei01Collaborators
13 days ago Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
13 days ago Added label: lgtmapproved
CANN-robotCANN-robotCollaborators
13 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
13 days ago Merged pull request