Skip to content

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.

3 participants