Skip to content

[Fix] Decide SWA slot liveness on the host instead of a device-side mask - #35592

Closed
hnyls2002 wants to merge 15 commits into
mainfrom
lsyin/swa-free-alive
Closed

hnyls2002 wants to merge 15 commits into
mainfrom
lsyin/swa-free-alive

Conversation

@hnyls2002

@hnyls2002 hnyls2002 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Removes the swa_indices[swa_indices > 0] filter from free_swa at page_size == 1 by having callers declare, from host state they already track, whether a range's SWA peers are still live; free_full completes the pair so free(x) == free_full(x) + free_swa(x) holds for every allocator. Stacks on #35773 -- the filter and the mapping clear synchronize independently, so the free path only goes sync-free with both.


CI States

Latest PR Test (Base): ❌ Run #32906898473
Latest PR Test (Extra): ❌ Run #32906898136
Latest PR Test (AMD ROCm 7.2): ❌ Run #32906898457

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 20, 2026
@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci extra

@hnyls2002

Copy link
Copy Markdown
Collaborator Author

CI States

Latest PR Test (Base): ⏳ Run #32397483870
Latest PR Test (Extra): ❌ Run #32397483488
Latest PR Test (AMD ROCm 7.2): ⏳ Run #32397483922

@sgl-project sgl-project deleted a comment from github-actions Bot Aug 20, 2026
@sgl-project sgl-project deleted a comment from github-actions Bot Aug 20, 2026
@sgl-project sgl-project deleted a comment from github-actions Bot Aug 20, 2026
# Conflicts:
#	python/sglang/srt/mem_cache/allocator/swa.py
#	python/sglang/srt/session/streaming_session.py
@hnyls2002

Copy link
Copy Markdown
Collaborator Author

Superseded: landed as #36637 (free_full), #36721 (free_kv_row), #36723 (page_size == 1) and #38159 (page_size > 1).

@hnyls2002 hnyls2002 closed this Sep 8, 2026
@hnyls2002
hnyls2002 deleted the lsyin/swa-free-alive branch September 8, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant