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

[linalg] Broadcast batch for mask on sdpa lowering #3824

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

rsuderman
Copy link
Contributor

Attention often broadcasts a mask across the batch dimension as masking is usually performed the same across attention heads. Added this materialization to the mask dimensions optionally.

Copy link
Collaborator

@dan-garvey dan-garvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Attention often broadcasts a mask across the batch dimension as masking
is usually performed the same across attention heads. Added this
materialization to the mask dimensions optionally.
@rsuderman rsuderman force-pushed the broadcast_attention_mask branch 3 times, most recently from c7f4569 to 89381cc Compare October 31, 2024 23:59
@rsuderman rsuderman merged commit 25738b8 into llvm:main Nov 1, 2024
3 checks passed
@rsuderman rsuderman deleted the broadcast_attention_mask branch November 1, 2024 01:04
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