Skip to content

Conversation

@Deleter-D
Copy link
Contributor

@Deleter-D Deleter-D commented Jul 24, 2024

PR types

Performance optimization

PR changes

Models

Description

Optimize the inference performance in Llama a8w8 case.

On the DCU platform, performance of rocblas gemm under different transpositions is NT > NN > TN. Due to the matmul of paddle, NT cannot be triggered in this scenario, so a suboptimal solution is chosen, which is NN.

@paddle-bot
Copy link

paddle-bot bot commented Jul 24, 2024

Thanks for your contribution!

@codecov
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 31 lines in your changes missing coverage. Please review.

Project coverage is 55.58%. Comparing base (da1eb9c) to head (7d4fdc6).
Report is 219 commits behind head on develop.

Files with missing lines Patch % Lines
...erimental/transformers/fused_transformer_layers.py 0.00% 17 Missing ⚠️
...dlenlp/experimental/transformers/llama/modeling.py 0.00% 14 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8800      +/-   ##
===========================================
+ Coverage    55.37%   55.58%   +0.21%     
===========================================
  Files          631      630       -1     
  Lines        99707    98382    -1325     
===========================================
- Hits         55211    54687     -524     
+ Misses       44496    43695     -801     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


def compute_out_linear(self, fmha_out, i):
out_linear_out = paddle.matmul(fmha_out, self.linear_weights[i], False, True)
if paddle.is_compiled_with_rocm():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把rocm需要不转置的理由在PR描述里说下吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已添加说明

@DesmonDay DesmonDay self-requested a review July 24, 2024 08:13
Copy link
Contributor

@DesmonDay DesmonDay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants