已合并
修复MoeTokenUnpermute #1081
fazhenyao123创建于 1月27日
修复MoeTokenUnpermute #1081
已合并
fazhenyao123创建于 1月27日
fazhenyao123
fazhenyao123成员
1月27日

描述

关联的Issue

测试

文档更新

类型标签

  • Bug修复
  • 新特性
  • 性能优化
  • 文档更新
  • 其他,请描述:
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 fazhenyao123 的贡献)
CANN-robot
CANN-robot成员
1月27日 评论:

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

likedislike
CANN-robot
CANN-robot成员
1月27日 评论:

以下是根据您提交的修改文件推荐的Reviewer和Committer序列,需各模块评审通过后方可合入

Module List Reviewers Committers
moe N/A songkai111, yu-xinjie62, chen-linxin4, liudan12, Allan_Yu
likedislike
CANN-robotCANN-robot成员
1月27日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
1月27日 评论:

CLA Signature Pass

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

likedislike
CANN-robot
CANN-robot成员
1月27日 评论:

🔵 source code change are detected, tasks labels is removed in this pull request!

likedislike
fazhenyao123
fazhenyao123成员
1月27日 评论:

compile

likedislike
CANN-robot
CANN-robot成员
1月27日 评论:

问题/功能描述

本次PR旨在优化MoeTokenUnpermute算子的内存使用效率。原实现中,为算子Tiling逻辑硬编码分配了16MB的workspace空间,此固定大小在不同AscendC平台场景下可能造成内存浪费或不足。本次修改移除了该硬编码设置,使内存分配更加精确和自适应。

修改方案描述

核心修改位于TilingCompute函数中。具体移除了TilingMoeTokenUnpermute函数内硬编码分配16MB workspace的逻辑,改为在函数末尾调用ascendcPlatform.GetLibApiWorkSpaceSize()接口,动态获取当前AscendC平台推荐的workspace大小。同时,增加了日志输出该动态值,便于调试和验证。此方案提升了代码的健壮性和平台兼容性,未引入新的安全风险。

likedislike
CANN-robotCANN-robot成员
1月27日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
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执行结束

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

/lgtm

likedislike
chen-linxin4成员
1月27日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
1月27日 添加了label:approved
chen-linxin4成员
1月27日 评论:

/lgtm

likedislike
於欣洁成员
1月27日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
1月27日 添加了label:lgtm
CANN-robot
CANN-robot成员
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.

likedislike
CANN-robotCANN-robot成员
1月27日 合入了pull request