Repository navigation
Conversation
Compile symbolic leading extents with exact strides through TVM-FFI. Preserve inner geometry and launch tactics in the cache key. Expose the provider capability for callers that warm representative layouts and tactics. Assisted-by: OpenAI Codex Signed-off-by: Andrii Skliar <askliar@nvidia.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Description
The BF16 GDN MTP decoder recompiles for changing batch sizes when serving paged state pools. Pool resizing also invalidates warmup specializations.
Strided descriptors now make only the outer batch and pool dimensions symbolic. Exact strides, inner geometry, dtype, device, and launch tactics remain specialized. TVM-FFI binds actual tensors at launch.
SUPPORTS_DYNAMIC_STRIDED_SHAPES=Truelets consumers enable compatible warmup.🔍 Related Issues
Consumer: vLLM PR #65657.
🚀 Pull Request Checklist
Thank you for contributing to FlashInfer! Before we review your pull request, please make sure the following items are complete.
✅ Pre-commit Checks
pre-commitby runningpip install pre-commit(or used your preferred method).pre-commit install.pre-commit run --all-filesand fixed any reported issues.Changed-file pre-commit hooks passed. The all-files run was not performed.
🧪 Tests
Tests have been added or updated as needed.
All tests are passing (
unittest, etc.).This PR requires full-scope CI, not targeted tests (expensive; justify below).
Reason: This change affects one decoder and its existing regression suite. Targeted CI is sufficient.
Suggested CI test targets (optional; paths under
tests/, whitespace-separated — a startingpoint for
@flashinfer-bot run <targets>//bot run <targets>, reviewers may adjust):tests/gdn/test_decode_ucache.pyEquivalent focused command on NVIDIA GB300, from a checkout with the candidate package and dependencies installed:
The baseline failed the intended cache-reuse assertion after batch and pool sizes changed. Output and pool comparisons passed before that assertion.
The regression covers T=8, changing batch/pool sizes, singleton views, page strides, flushes, wrapped rings, and graph replay with negative indices. It compares output, state, and rings exactly against the compact path.
The provider-only model comparison used NVIDIA GB300 and
nvidia/Qwen3.5-122B-A10B-NVFP4, with BF16 recurrent state and natural MTP7. Both runs used vLLMb95a484d72ba, batch size 256, prompt lengths 36–146, 256 output tokens per request, and disabled prefix caching.Baseline workload warmup spent 10.235 s in compile/load calls. Its measured-generation miss took 0.949 s. The candidate's remaining factual-request miss took 1.470 s.
The remaining miss selects a distinct input stride and launch tactic. The companion vLLM warmup covers that combination and requires the capability marker.
A final run used vLLM
c350280daccawith the same workload and this provider patch. All 12 variants compiled during startup warmup.Those variants cover MBP 2–7 for QKV strides 12,288 and 20,480. Workload warmup, measured generation, and factual prompts recorded zero decoder compile/load calls.
All four factual token arrays matched the baseline and stopped normally. The final run had zero preemptions.
Compile logging affects host timing. These results do not establish an uninstrumented throughput speedup. All four factual answers matched and stopped normally. Timed continuations were not all identical, so this is not full-model parity evidence.
🔬 Experimental Track
flashinfer/experimental/and/or an@flashinfer_experimental_api. Tracking issue: #tests/experimental/and were validated on the intended hardware; a runnable example is included.flashinfer/aot.py, and no experimental backend is reachable frombackend="auto"withoutFLASHINFER_ALLOW_EXPERIMENTAL_AUTO_BACKENDS=1. (Calling an@flashinfer_experimental_apior naming a backend explicitly is itself the opt-in and needs no environment variable.)Reviewer Notes
The compact path and recurrence arithmetic are unchanged. The prefix materializer's separate pool-capacity specialization remains outside this decoder fix. BF16 STP is also outside this change.
The model comparison used an isolated patched 0.7.3 provider. It does not show this behavior in an unpatched release. Full-suite tests were not run.
AI assistance: OpenAI Codex.