[2026春季][T2-1-3]xuzheng567#496
Open
xuzheng567 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
基本信息
赛题:T2-1-3(qwen3 MOE模块优化)
队名:你说得都
成员:xz
github:
https://github.com/xuzheng567/InfiniCore
https://github.com/xuzheng567/InfiniLM
开发说明
([2026春季][T2-1-3]xuzheng567 InfiniCore#1388)
添加fused moe算子以及相应测试脚本,使用cutlass进行优化加速。参照项目已有算子对多个硬件平台进行了适配尝试。
在已有的qwen3模型模块中,使用新的fused moe算子,替换掉了原本需要和cpu进行交互的moe计算方式。原本还重写了topk router部分,但后来发现框架对这一部分进行了更新迭代,改用框架内的最新写法。替换之后模型中计算逻辑中无cpu-gpu交互,可使用框架内自带的cuda graph功能进一步提速。
结果
推理性能测试
使用框架已有的bench.py,在输入输出长度均为1024的情况下测试
更改前:
更改后:
可使用cuda graph
Prefill吞吐提升210倍,Decode吞吐提升4.45倍
多平台适配
参照框架内已有的跨平台算子的格式,将fused moe算子适配了复用cuda代码的硬件平台:
时间原因,大部分国产平台未来得及验证。
HONOR_CODE.md
REFERENCE.md