已关闭
Fix CleanCode #11170
yayahello创建于 9月3日关闭于 9月4日
Fix CleanCode #11170
已关闭
当前Pull Request已关闭, 关闭人@yayahello
atomgit-bot
9月3日 评论:
9月3日 评论:
变更摘要
该 PR(标题 "Fix CleanCode")针对 mc2 目录下 MoE 分布式通信相关算子的 op_api 实现进行代码清理:为仅做空指针校验、实际不修改的 tensor 指针参数补充 const 限定符,移除 CheckParams 中未被使用的参数并同步更新调用处,同时对长表达式和函数签名做格式化整理,不涉及业务逻辑与对外行为变更。
主要改动
- 补充
const限定符: 在aclnn_moe_ep_dispatch.cpp、aclnn_moe_ep_dispatch_epilogue.cpp、aclnn_moe_ep_combine_epilogue.cpp的CheckNotNull中,为combinedX、recvX、recvSrcMetadata、recvTopkWeights、recvScales、numRecvTokensPerRank、numRecvTokensPerExpert、dstBufferSlotIdx、routeCount、routeDstScaleout、routeScaleoutSlot等仅被校验是否为空、不被写入的形参加上const,使校验函数语义更清晰。 - 移除未使用参数: 删除
aclnn_moe_distribute_dispatch_teardown.cpp中CheckParams的expertShardType、sharedExpertRankNum、moeExpertNum、globalBs形参,以及aclnn_moe_ep_dispatch.cpp中CheckParams的expertAlignment形参,并同步简化aclnnMoeDistributeDispatchTeardownGetWorkspaceSize、aclnnMoeEpDispatchGetWorkspaceSize等处的调用。 - 代码格式化整理: 对
aclnn_moe_ep_dispatch.cpp与aclnn_moe_ep_dispatch_epilogue.cpp中较长的函数签名、anyCachedRoute/allCachedRoute/hybridCachedMode布尔表达式及调用语句按多行风格重排,属于纯排版调整,不影响编译结果与运行时行为。


不准确?
9月3日 添加了label:cann-cla/yes
CANN-robot
9月3日 评论:
9月3日 评论:
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
⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| */*/op_api/aclnn*.h | ❌ (0/2)(You can also ask: tgwsakiko_, wang-minbo, 王永光, 刘丹, 汤磊) | ❌ (0/1)(You can also ask: 汤磊, 王永光) |
| mc2 | ❌ (0/2)(You can also ask: 黄俊健, captainmiaow, libohao6, 俞郑中, yangzeheng) | ❌ (0/1)(You can also ask: captainmiaow, liuboxi, chenjunjian11, 刘丹, wang-minbo) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
yayahello, thanks for your pull request. All authors of the commits have signed the CLA. 👍


CANN-robot
9月3日 评论:
9月3日 评论:
9月3日 将captainmiaow,monologue815,jiang-lirui,Allan_Yu,wang-minbo,tgwsakiko_,liudan12,chenjunjian11,yangzeheng,liuboxi,luobaiqing,libohao6,mabing1118,macech设为评审人
9月3日 将captainmiaow,monologue815,jiang-lirui,Allan_Yu,wang-minbo,tgwsakiko_,liudan12,chenjunjian11,yangzeheng,liuboxi,luobaiqing,libohao6,mabing1118,macech设为评审人
此处折叠了33条事件消息 查看更多
描述
关联的Issue
测试
文档更新
类型标签