Skip to content

perf(indexer): reuse immutable B12X C4 plans - #531

Merged
lukealonso merged 1 commit into
dev/jovian-judgementfrom
perf/glm53-b12x-c4-plan-reuse-20260830
Aug 31, 2026
Merged

perf(indexer): reuse immutable B12X C4 plans#531
lukealonso merged 1 commit into
dev/jovian-judgementfrom
perf/glm53-b12x-c4-plan-reuse-20260830

Conversation

@voipmonitor

@voipmonitor voipmonitor commented Aug 30, 2026

Copy link
Copy Markdown

Result

Status: implemented and qualified for vLLM's B12X C4 indexer adapter.

The adapter resolves one immutable B12X plan for each device, query geometry,
page-table capacity, and serving mode. Every invocation reuses that plan while
binding live metadata and materializing views over caller-owned workspace.

Technical reason

Plan construction validates static geometry and resolves a kernel policy. None
of those properties changes between layer invocations for a loaded model.
Repeating plan construction in the prefill hot path adds Python and policy
resolution overhead without changing the selected operation.

Operation contract and compatibility

  • vLLM retains ownership of every workspace allocation.
  • Live query, cache, page-table, sequence-length, and output tensors are bound
    on every invocation; tensor addresses are not retained in the immutable
    plan.
  • Decode and prefill use separate plan-cache entries when their geometry or
    serving mode differs.
  • Logical output indices, scratch capacity, public B12X interfaces, and
    fallback selection are unchanged.

Validation

Source base: dev/jovian-judgement at
0b67266a0f37d6146a8403fb8482403c62f412d5.

/opt/venv/bin/python -B -m pytest -q \
  tests/v1/attention/test_b12x_sparse_mla_api.py \
  -k "dsa_indexer_reuses_plans_and_rebinds_shared_workspace"

The parameterized adapter cases verify plan reuse, per-call workspace
rebinding, logical output indices, and profiling workspace capacity.
Result: 1 passed, 44 deselected.

The source-locked TP4/DCP4 integration at vLLM
3609a3db498698314bdc44920cad9f2d25796eb9 and B12X composition
6255090a03b12c3f7d552102a02fac0b542fb8c9 completed model loading, memory
profiling, target graph capture, DFlash2 graph capture, and 32k prefill on four
RTX PRO 6000 Blackwell GPUs. The B12X composition contains #259 and #260 over
master@fc1d4b68f7a5b0cfdb88bf06abccd869f5c589d5. This is an integration
qualification, not an end-to-end speed attribution to plan reuse alone.

AI assistance disclosure

AI assistance was used to implement and test the adapter, qualify the composed
runtime, and prepare this pull-request description.

Resolve each B12X C4 plan once per device, query geometry, page-table capacity, and serving mode. Reuse the immutable plan while materializing caller-owned workspace views and binding live metadata on every invocation.

This preserves vLLM workspace ownership and live-tensor semantics. Two adapter tests verify plan reuse, per-call workspace rebinding, logical output indices, and profile workspace capacity. On TP4 GLM-5.3-Flash-NVFP4 with 4096-token chunked prefill, the idle 32k five-run median is 13,164 tok/s versus 13,141 tok/s for the DeepGEMM C4 control.

Signed-off-by: Martin Vit <martin@voipmonitor.org>
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 48 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 363e4e13-687b-46d0-ad89-009e1217f994

📥 Commits

Reviewing files that changed from the base of the PR and between 0b67266 and b8edca5.

📒 Files selected for processing (2)
  • tests/v1/attention/test_b12x_sparse_mla_api.py
  • vllm/models/deepseek_v4/nvidia/b12x_indexer.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@voipmonitor

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@lukealonso
lukealonso merged commit 2f66788 into dev/jovian-judgement Aug 31, 2026
3 of 4 checks passed
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