Skip to content

Conversation

@Bernard-Liu
Copy link
Contributor

Motivation

adapt for opitimized ps_gluon_pa, for a better perfomance for small bs

Copilot AI review requested due to automatic review settings January 8, 2026 06:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adapts the code to use an optimized ps_gluon_pa implementation for better performance with small batch sizes. The changes fix a typo in variable naming and update the paged attention implementation to use the optimized version with recommended partition splits.

  • Fixed typo: attn_matadataattn_metadata
  • Replaced manual partition calculation with get_recommended_splits() function
  • Updated to use torch.ops.aiter.pa_decode_gluon and changed parameter from one_shot to ps

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
atom/model_ops/attentions/aiter_attention.py Fixed typo in variable name attn_matadata to attn_metadata and removed extra blank line
atom/model_ops/attention_mha.py Refactored partition calculation to use get_recommended_splits(), updated kernel call to use torch ops namespace, and changed one_shot parameter to ps=True

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 8, 2026 06:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Bernard-Liu Bernard-Liu force-pushed the bernard_ps_pa_upstream branch from 0245a3c to 17ac2d9 Compare January 8, 2026 06:51
@Bernard-Liu Bernard-Liu assigned valarLip and unassigned valarLip Jan 8, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Bernard-Liu Bernard-Liu self-assigned this Jan 8, 2026
@valarLip valarLip merged commit 3d6a6d2 into main Jan 8, 2026
9 of 12 checks passed
@valarLip valarLip deleted the bernard_ps_pa_upstream branch January 8, 2026 13:35
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