[Feature] Qwen 模型 Triton SwiGLU 激活函数优化 (2.58x 加速)#2769
Open
autism-ip wants to merge 2 commits into
Open
Conversation
- Add Triton SwiGLU kernel (2.58x speedup on Ascend NPU) - Add Triton GELU kernel (0.80x - PyTorch native is faster) - Add MindSpore adapter (MSGELU, MSSwiGLU) - Add complete optimization pipeline (profiling, testing, benchmark, e2e) - Add detailed documentation and performance reports Performance data (Ascend NPU, fair comparison): - SwiGLU: 3.06ms (Native) -> 1.19ms (Triton) = 2.58x - GELU: 0.75ms (Native) -> 0.94ms (Triton) = 0.80x Compatible with MindSpore 2.8.0 + torch 2.7.1+npu
modified: src/mindnlp/triton/docs/ANALYSIS_REPORT.md new file: src/mindnlp/triton/docs/ISSUE_ANALYSIS_DRAFT.md modified: src/mindnlp/triton/kernels/activations.py
Author
|
【开源实习】Triton算子开发/接入 #1817 |
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.
摘要
基于 MindSpore 框架,使用 Triton 技术栈为 Qwen 模型开发高性能替换算子:
性能数据(Ascend NPU,公平对比)
新增 API