已合并
修复MoeTokenUnpermute #1081
fazhenyao123创建于 1月27日
修复MoeTokenUnpermute #1081
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 fazhenyao123 的贡献)CANN-robot
1月27日 评论:
1月27日 评论:
CANN-robot
1月27日 评论:
1月27日 评论:
以下是根据您提交的修改文件推荐的Reviewer和Committer序列,需各模块评审通过后方可合入
| Module List | Reviewers | Committers |
|---|---|---|
| moe | N/A | songkai111, yu-xinjie62, chen-linxin4, liudan12, Allan_Yu |


1月27日 添加了label:cann-cla/yes
CANN-robot
1月27日 评论:
1月27日 评论:
CANN-robot
1月27日 评论:
1月27日 评论:
🔵 source code change are detected, tasks labels is removed in this pull request!


fazhenyao123
1月27日 评论:
1月27日 评论:
compile


CANN-robot
1月27日 评论:
1月27日 评论:
问题/功能描述
本次PR旨在优化MoeTokenUnpermute算子的内存使用效率。原实现中,为算子Tiling逻辑硬编码分配了16MB的workspace空间,此固定大小在不同AscendC平台场景下可能造成内存浪费或不足。本次修改移除了该硬编码设置,使内存分配更加精确和自适应。
修改方案描述
核心修改位于TilingCompute函数中。具体移除了TilingMoeTokenUnpermute函数内硬编码分配16MB workspace的逻辑,改为在函数末尾调用ascendcPlatform.GetLibApiWorkSpaceSize()接口,动态获取当前AscendC平台推荐的workspace大小。同时,增加了日志输出该动态值,便于调试和验证。此方案提升了代码的健壮性和平台兼容性,未引入新的安全风险。


1月27日 添加了label:ci-pipeline-running
CANN-robot
1月27日 评论:
1月27日 评论:
流水线任务触发成功,任务链接 [818f87efc06f45f484506700f0ae0e0c]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| anti_virus | ✅ SUCCESS | >>>>> | |
| Check_Pr | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Pre_Compile | ✅ SUCCESS | ||
| API_Check | ✅ SUCCESS | >>>>> | |
| UT_Test | ✅ SUCCESS | ||
| Smoke_A900 | ✅ SUCCESS | >>>>> | >>>>> |
[2026-01-27 11:05:23] CI执行结束


1月27日 添加了label:api-check-pass
此处折叠了5条事件消息 查看更多
1月27日 添加了label:ci-pipeline-passed
chen-linxin4
1月27日 评论:
1月27日 评论:
/lgtm


chen-linxin4
1月27日 评论:
1月27日 评论:
/approve


1月27日 添加了label:approved
chen-linxin4
1月27日 评论:
1月27日 评论:
/lgtm


1月27日 添加了label:lgtm
CANN-robot
1月27日 评论:
1月27日 评论:
Review Guide
This Pull-Request Passes Review.
Committers who wrote a comment of /approve are: chen-linxin4.
Reviewers who wrote a comment of /lgtm are: chen-linxin4, yu-xinjie62.


1月27日 合入了pull request
描述
关联的Issue
测试
文档更新
类型标签