Skip to content

[Metrics] Read scheduled prefill KV tokens from batch prefix_lens - #42797

Merged
hnyls2002 merged 2 commits into
mainfrom
lsyin/fpm-prefill-kv
Oct 6, 2026
Merged

hnyls2002 merged 2 commits into
mainfrom
lsyin/fpm-prefill-kv

Conversation

@hnyls2002

@hnyls2002 hnyls2002 commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator
  • Compute sum_prefill_kv_tokens from batch.prefix_lens (the prefix scheduled for this forward) instead of each req's prefix_indices, which result processing may already have advanced past the chunk
  • Mixed batches: prefill reqs lead batch.reqs, so they own the head of prefix_lens

CI States

Latest PR Test (Base): 🚫 Run #37522676612
Latest PR Test (Extra): ❌ Run #37522676007
Latest PR Test (AMD ROCm 10): 🚫 Run #37522676598

@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Oct 6, 2026
@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/rerun-test registered/unit/observability/test_forward_pass_metrics.py

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

🚀 ubuntu-latest (1 test): ✅ View workflow run

cd test/ && python3 registered/unit/observability/test_forward_pass_metrics.py

@hnyls2002
hnyls2002 merged commit 1200404 into main Oct 6, 2026
95 of 136 checks passed
@hnyls2002
hnyls2002 deleted the lsyin/fpm-prefill-kv branch October 6, 2026 20:11
cursor Bot pushed a commit to cipheraxat/sglang that referenced this pull request Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant