Skip to content

fix edge cases#2906

Open
fsx950223 wants to merge 1 commit intomainfrom
pa_gluon_fix23
Open

fix edge cases#2906
fsx950223 wants to merge 1 commit intomainfrom
pa_gluon_fix23

Conversation

@fsx950223
Copy link
Copy Markdown
Contributor

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@fsx950223 fsx950223 requested review from a team and Copilot April 24, 2026 09:52
@github-actions
Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
ci:sglang SGLang integration tests
ci:atom ATOM benchmark (DeepSeek-R1 + GPT-OSS)
ci:vllm vLLM benchmark
ci:all All of the above

Add labels via the sidebar or gh pr edit 2906 --add-label <label>

Copy link
Copy Markdown
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 adjusts the Triton/Gloun paged-attention decode kernel to handle a couple of edge cases around multi-token-per-program (MTP) indexing and per-token KV scale staging.

Changes:

  • Fixes query_token_idx computation for QUERY_SEQ_LEN_POW2 > 1 to avoid double-counting the mtp_idx offset after max_logits_base_offsets is expanded into the flattened query-group space.
  • Removes a later redundant/incorrect recomputation of query_token_idx based on the already-expanded max_logits_base_offsets.
  • Ensures per-token KV scales are reshaped to a 1D [CONTEXT_PARTITION_SIZE] buffer before staging into shared memory.

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

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