Skip to content

Perf page - #1696

Merged
hiworldwzj merged 23 commits into
mainfrom
perf_page
Nov 11, 2026
Merged

hiworldwzj merged 23 commits into
mainfrom
perf_page

Conversation

@blueswhen

Copy link
Copy Markdown
Collaborator

No description provided.

hiworldwzj and others added 16 commits November 9, 2026 08:01
Give each request one of three token-index modes and let the allocator speak only in tokens, so page compression stays internal and the original free and match flow remains intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
Host input packing, the FlashMLA test harness, and the calibration blob are separate from token-level page indexes. Restore the tests that still match the page-size behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
The fused kernel was separate from paged allocation. Forward again selects indexes from the request table and gathers token ids on its own, while page indexes stay on the token-level API.

Co-authored-by: Cursor <cursoragent@cursor.com>
ReqManager only owns request slots and the token table. Page-aligned allocation and release now go through the attention allocator and each request's token index.

Co-authored-by: Cursor <cursoragent@cursor.com>
The allocator already supplies one reserved page. bind_hold_page only needs to tile that page across the padding request row.

Co-authored-by: Cursor <cursoragent@cursor.com>
The return buffer is only needed when handing back token indexes, so it no longer starts as an empty placeholder.

Co-authored-by: Cursor <cursoragent@cursor.com>
Request rows are written by the token-index modes, so the packed page-start publish kernel has no callers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Padded decode writes token id 1 directly into input_ids, so the HOLD row of req_to_next_token_ids is never read.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match the master/slave flow that waits for the in-flight prefill read, frees deduped pages through the token-index view, and keeps the page tail across reset.

Co-authored-by: Cursor <cursoragent@cursor.com>
Each accepted request reserves its own pages, and pending token indexes are copied with one stream-ordered H2D batch.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the optional finish mark consistent with the getattr read that treats a missing attribute as false.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the index reset after free snapshots are captured, and write matched prefixes in place instead of through a shared helper.

Co-authored-by: Cursor <cursoragent@cursor.com>
Read the matched GPU prefix with get_gpu_token_indexes so the upload is ordered with the load stream, and drop the early upload in add_reqs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Recovered requests wait for the next scheduling round, which uploads their indexes before inference.

Co-authored-by: Cursor <cursoragent@cursor.com>
Export prompt logprobs and routed experts from the CPU index snapshot, and load a CPU-cache page from one GPU index span after allocation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Build prefill and decode metadata with one NumPy conversion and write prompt ids into pinned memory, matching the wzj_demo input path.

Co-authored-by: Cursor <cursoragent@cursor.com>
sufubao and others added 4 commits November 10, 2026 17:35
@hiworldwzj
hiworldwzj merged commit 5e9a7e6 into main Nov 11, 2026
1 check passed
@hiworldwzj
hiworldwzj deleted the perf_page branch November 11, 2026 06:28
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