-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DiT with decorator, triton fused_AdaLN and fineGrained #552
Open
YKTian-x2b
wants to merge
27
commits into
PaddlePaddle:develop
Choose a base branch
from
YKTian-x2b:DiT_FFN_fineGrained
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Thanks for your contribution! |
def compute_activation(self, ffn1_out): | ||
origin_batch_size = ffn1_out.shape[0] | ||
origin_seq_len = ffn1_out.shape[1] | ||
ffn1_out = ffn1_out.reshape([origin_batch_size*origin_seq_len, ffn1_out.shape[-1]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这两个reshape加的不太好,建议拓展下fused_bias_act的实现
…nto DiT_FFN_fineGrained 'merge develop for push'
…addleMIX into DiT_FFN_fineGrained 'merge myRepo develop for push'
YKTian-x2b
changed the title
DiT FFN fineGrained
DiT with decorator, triton fused_AdaLN and fineGrained
Jun 12, 2024
|
||
# To speed up this code, call zkk and let him run for you, | ||
# then you will get a speed increase of almost 100%. | ||
os.environ['callZKK']= "True" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个环境变量改成其他的,可以optimize_inference_for_ditllama?
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.
DiT with decorator, triton fused_AdaLN/fused_rotary_emb, horizontal fusion qkv and fineGrained ffn.
25步 + 256*256 + 新ir + 5次端到端取均值
3B最终耗时:581ms (+61.2%)
7B最终耗时:926ms (+41.4%)