Skip to content

[Release v0.1.21] Cherry-pick _fold_seqlen_indptr cudagraph-safe fix (#5202) - #5222

Merged
zufayu merged 1 commit into
release/v0.1.21from
hotfix/v0.1.21-post1
Sep 3, 2026
Merged

[Release v0.1.21] Cherry-pick _fold_seqlen_indptr cudagraph-safe fix (#5202)#5222
zufayu merged 1 commit into
release/v0.1.21from
hotfix/v0.1.21-post1

Conversation

@zufayu

@zufayu zufayu commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick #5202 onto release/v0.1.21.

Original PR:

Original commit:

Backport commit:

This makes _fold_seqlen_indptr cudagraph-safe by avoiding the scalar H2D copy (out[0] = 0), replacing the empty+indexed-write pattern with torch.nn.functional.pad(cumsum, (1, 0), value=0), and adds unit tests for the folded indptr path in the persistent MLA decode tests.

To be published as v0.1.21.post1 once merged (tag on the merge commit, release automation builds the wheel set).

…copy) (#5202)

* make _fold_seqlen_indptr cudagraph safe

Signed-off-by: Micah Williamson <micah.williamson@amd.com>

* [Claude] add unit tests

Signed-off-by: Micah Williamson <micah.williamson@amd.com>

* [Claude] fix formatting and tests

Signed-off-by: Micah Williamson <micah.williamson@amd.com>

---------

Signed-off-by: Micah Williamson <micah.williamson@amd.com>
(cherry picked from commit 5d23231)
@zufayu
zufayu merged commit b70c470 into release/v0.1.21 Sep 3, 2026
3 checks passed
@zufayu
zufayu deleted the hotfix/v0.1.21-post1 branch September 3, 2026 03:27
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