-
Notifications
You must be signed in to change notification settings - Fork 64
Add jagged hstu attention example (i.e. ragged_attention) #527
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
Conversation
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
examples/jagged_hstu_attn.py
Outdated
| ) | ||
|
|
||
|
|
||
| def tritonbench_hstu_attention_function(inputs: dict[str, Any]) -> torch.Tensor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious does it pass accuracy check compared to ragged_attention in tritonbench? If so, maybe we can add a dispatch in KERNEL_MAPPINGS in benchmarks/run.py to integrate with tritonbench.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :) Could you check and make sure that I added things to KERNEL_MAPPINGS correctly?
| @@ -0,0 +1,291 @@ | |||
| """ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to add a test in test_examples.py too. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this one as well. Let me if I missed something.
yf225
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! left some inline comments above
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
yf225
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much!
Stack from ghstack (oldest at bottom):