microsoft / microsoft/MInference
[Question]: Potential chance for better attention kernel
Open
@iofu728 is already working on this.
Since Apr 28, 2025.
question
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 82
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
Describe the issue
Thank you again for your work.
I think kernel for each head is executed sequentially:
- single-head is hard to activate all performance of GPU
- inter-head warps miss the overlap chance, which is important for GPU SIMT
Have you thought about improve the kernel to realize the parallelism of heads. I think that the head loop is ok if the context length is super long enough (maybe). However, the speedup is limited when sequence is not super long, like 60k, as the baseline flash attention compute head in parallel.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.