You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As for performance evaluation, there are two issues
deep tiled matmul will not be in effect if the parent op of matmul is scf::forall, so we need to either support this scenario or directly invoke the deep tiled matmul in flash attention kernel
5x performance gap
<style>
</style>
SEQ LENGTH / DTYPE
graph compiler v1 (ms)
v2, block 32, brgemm invoked (ms)
Ratio
384 / fp32
8.28744
48.996
5.912079
768 / fp32
39.1193
190.557
4.871176
1536 / fp32
177.446
752.762
4.242203
2304 / fp32
389.382
1837.45
4.718888
3072 / fp32
682.228
3273.3813
4.798075
Next steps for performance alignment is
Compare the precise brgemm config used in both cases (v1 v.s. mlir)
As for performance evaluation, there are two issues
deep tiled matmul will not be in effect if the parent op of matmul is scf::forall, so we need to either support this scenario or directly invoke the deep tiled matmul in flash attention kernel
As for performance evaluation, there are two issues
deep tiled matmul will not be in effect if the parent op of matmul is scf::forall, so we need to either support this scenario or directly invoke the deep tiled matmul in flash attention kernel
Compare the precise brgemm config used in both cases (v1 v.s. mlir)
Perform more detailed performance breakdown
Please try brgemm instead of matmul, which can provide better performance result.
I dumped the final llvm IR, and verified that the current performance is collected with brgemm invoked. Previously when brgemm was not in effect, the performance is 10x worse. I think I need to do more detailed analysis to find where the performance gap exists exactly.
linalg.exp takes 1/3 of total execution time; needs to convert to optimized version
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
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.
Tracking issue #147.
TODO: