perf: reduce repeated Triton autotuning for L2Norm - #1
Open
Kamleecoder wants to merge 1 commit into
Open
Conversation
…teration 耗时异常增长的问题。
|
Hello, This repo is only a mirror with no active development or maintenance. Original Repository Link: https://gitcode.com/Ascend/MindSpeed |
CLA Signature Guide@Kamleecoder , thanks for your pull request. The following commit(s) are not associated with a signed Contributor License Agreement (CLA).
To sign CLA, click here. To check if your email is configured correctly, refer to the FAQs. Once you've signed the CLA or updating your email, please comment |
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.
修复 L2Norm Triton kernel 在动态 token 数场景下因输入 T/NB 变化反复触发 autotune,导致训练 iteration 耗时异常增长的问题。
动态 shape / 动态 token 数训练时,L2Norm Triton kernel
会随着 T/NB 变化重复执行 autotune。
每次 autotune 需要遍历大量 BT × num_warps 配置,
单次可能耗时 20s+,多次累积导致一个训练 step 超过 10 分钟。