Skip to content

Optimize triton flashMLA for Iluvatar GPU #1188

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BruceDai003
Copy link

Optimizations have been implemented on the Iluvatar GPU for scenarios that meet two conditions:

  1. the load does not contain a mask;
  2. it is in the case of MQA.
    The implementation ensures that the kv_cache loaded each time belongs to the same page, thus being contiguous. As a result, the QKV load can be faster. Additionally, the tile size has been adjusted according to the hardware characteristics, leading to more reasonable resource utilization and overall better performance. Compared with the original kernel implementation that does not meet the above conditions( only modify num_stages=1, keep num_warps = 4), in the benchmark test with an input of 6K and an output of 2K, the performance has been improved by approximately 11 times.

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.

2 participants