Merged
fix(operation): Fix Remainder Temp Workspace #6345
刘奕哲Add on Sep 15
fix(operation): Fix Remainder Temp Workspace #6345
Merged
Merged fromCreeeeper/pyptorem-tmp-fix-9.2.0intocann/pypto9.2.0
Pull Request has been successfully merged by CANN-robot.
(Thank you for 刘奕哲's contribution.)Sep 15 Associated issue: [Bug-Report|缺陷反馈]: Remainder精度报错
atomgit-bot
Sep 15 Comments:
Sep 15 Comments:
变更摘要
本 PR 为 Bug 修复:Remainder 算子(取余运算)的临时工作空间(temp workspace)尾轴未按 256B 对齐,导致调用 vcmp 指令时发生 UB 访问越界。改动将临时空间的尾轴对齐粒度从原来的 BLOCK_SIZE 调整为 256B(新增常量 NUM_VALUE_256),并同步修正 mask 相关对齐计算,涉及标量版 TiledRemainderSOperation 与二进制分块版 AddTiledBinaryOperation 中的 REM 分支。
主要改动
- 新增 256 对齐常量:在
framework/src/interface/operation/operation_common.h中新增常量constexpr int32_t NUM_VALUE_256 = 256;,为后续对齐计算提供统一的 256B 基准。 - 修正
TiledRemainderSOperation临时空间对齐:在framework/src/interface/operation/vector/binary_scalar.cpp中,将alignSize由BLOCK_SIZE / BytesOf(...)改为NUM_VALUE_256 / BytesOf(...),并将maskFloats的对齐基准由BLOCK_SIZE改为NUM_VALUE_256,使临时空间尾轴按 256B 对齐。 - 修正
AddTiledBinaryOperationREM 分支对齐:在framework/src/interface/operation/vector/binary_tiled.h中,对 REM 算子的alignSize与maskFloats做同样的BLOCK_SIZE到NUM_VALUE_256对齐基准替换,避免分块路径下vcmp访问越界。


Incorrect?
atomgit-bot
Sep 15 Comments:
Sep 15 Comments:
Sep 15 Added label: cann-cla/yes
CANN-robot
Sep 15 Comments:
Sep 15 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 |
|---|---|---|
| docs | ✅ 尹杰, lyz0328 (2/2) | ✅ lyz0328, 尹杰 (2/1) |
| framework/src/interface/operation | ✅ shi-dingkun, 尹杰 (2/2) | ✅ shi-dingkun, 尹杰 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
Creeeeper, thanks for your pull request. All authors of the commits have signed the CLA. 👍


Sep 15 Set xinweiliu,lyz0328,cam_bxh,dai-zhentao,lululu40888,shi-dingkun,gguuaanngg,codehjp423,gaoxiang618,wangzheng97,DCGDDD,syfeng,jason_yuan_ye,foundea,ym-HW,hw_zhangzhiqi,yinjie27_,congqiannan,zhangyuebing,tsungl4,gaoxingwang,zhiweiyuan,caodongdong,make_pto,zhoubotcam,linjiashu,wangbing110,WenboCodes as approver
Sep 15 Set xinweiliu,lyz0328,cam_bxh,dai-zhentao,lululu40888,shi-dingkun,gguuaanngg,codehjp423,gaoxiang618,wangzheng97,DCGDDD,syfeng,jason_yuan_ye,foundea,ym-HW,hw_zhangzhiqi,yinjie27_,congqiannan,zhangyuebing,tsungl4,gaoxingwang,zhiweiyuan,caodongdong,make_pto,zhoubotcam,linjiashu,wangbing110,WenboCodes as approver
Sep 15 Set xinweiliu,lyz0328,cam_bxh,dai-zhentao,shi-dingkun,gguuaanngg,foundea,yinjie27_,tsungl4,make_pto,linjiashu as approver
Sep 15 Set xinweiliu,lyz0328,cam_bxh,dai-zhentao,shi-dingkun,gguuaanngg,foundea,yinjie27_,tsungl4,make_pto,linjiashu as approver
刘奕哲
Sep 15 Comments:
Sep 15 Comments:
compile


Sep 15 Pre merge succeeded (commit_id: efcd022348625b1369c36de7760f6e94fe2ac431)
CANN-robot
Sep 15 Comments:
Sep 15 Comments:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


Sep 15 Added label: ci-pipeline-running
6 event messages are collapsed here。 See more
Sep 16 Removed label: ci-pipeline-passed
CANN-robot
Sep 16 Comments:
Sep 16 Comments:
Sep 16 Added label: cann-cla/yes
lyz0328
Sep 16 Comments:
Sep 16 Comments:
/approve


刘奕哲
Sep 16 Comments:
Sep 16 Comments:
compile


Sep 16 Pre merge succeeded (commit_id: aa7994f92afa9dcb2b235d518871668888fc93a9)
CANN-robot
Sep 16 Comments:
Sep 16 Comments:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


Sep 16 Added label: ci-pipeline-running
shi-dingkun
Sep 16 Comments:
Sep 16 Comments:
/approve


Sep 16 Added label: approved
Sep 16 Removed label: ci-pipeline-running
Sep 16 Added label: ci-pipeline-passed
Jie Yin
Sep 16 Comments:
Sep 16 Comments:
/approve


Sep 16 Added label: lgtm
Sep 16 Closed associated issue
Sep 16 Merged pull request
描述
Remainder算子临时空间尾轴未进行256B对齐导致调用vcmp时UB访问越界,现修改其对齐方式
测试
完成自测以及冒烟测试
关联Issue
#3335
类型标签