Skip to content
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

Restore the support of causal=True and seqlen_q != seqlen_k #55

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

xinyazhang
Copy link
Collaborator

@xinyazhang xinyazhang commented Nov 14, 2024

Major changes

  1. Fix the Triton kernel to support causal=True and seqlen_q != seqlen_k
    • This matches efficient attention behavior (align to top left corner)
  2. Re-Enable the related tests
  3. Re-Enable the related tuning (also fixes OOM on long seqlen_q/k)
  4. Add the missing entries to tuning database for causal=True and seqlen_q != seqlen_k

Known Problems

No tuning entries for MI300X/Navi31 since we are going to re-run the tuning script for all cases no later than next week.

@xinyazhang xinyazhang marked this pull request as ready for review November 14, 2024 05:17
@xinyazhang
Copy link
Collaborator Author

xinyazhang commented Nov 14, 2024

Most tests passed (105 failed vs 36759 passed).
The failed tests are due to higher numerical errors on MI200 hardware (and I didn't bother to fine tune the tolerance for MI200 right now).

image

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