[None][feat] add Rubin topology and prototype locality-domain sharding to GVR V2 decode - #18763
Draft
longcheng-nv wants to merge 14 commits into
Draft
[None][feat] add Rubin topology and prototype locality-domain sharding to GVR V2 decode#18763longcheng-nv wants to merge 14 commits into
longcheng-nv wants to merge 14 commits into
Conversation
…ntion config enable_heuristic_topk keeps selecting the GVR family over the exact radix path; a new use_self_sampling_topk config field (default True) selects the hint-free self-sampling engine over the temporal-hint engines. The CUTE_DSL_GVR_V2 enum folds into CUTE_DSL_GVR behind a gvr_self_sampling module flag, TopK.needs_gvr_prior follows the two-level decision, and the retired TRTLLM_GVR_SELF_SAMPLING env only warns. The field threads llm_args -> model_config -> DSAParams/DSAMetadataParams -> indexer and the warmup mirror (whose top_k source also moves off a dead index_topk getattr to sparse_mla_topk). Made-with: Claude Code (Fable 5) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
Nothing selects the CUDA heuristic once the unified DSL GVR router is
in: delete heuristicTopKDecode.{cu,h} / heuristic_topk.cuh, the
canUseHeuristic dispatch and the GVR SchemeX bounds in indexerTopK.cu
(radix keeps a cached SM-count helper), shrink the indexer_topk_decode
thop schema and its register_fake (pre_idx / heuristic_scratch gone),
drop the CUDA_GVR enum plus module branch, and retire the
heuristic-only distribution / hostile-hint / tie-plateau test arms.
The radix insertion / histogram / split-work tiers are untouched.
C++ changes are not compiled yet: build + CI plus the 886x11 CUDA-v1
vs DSL-v1 paired A/B sign-off gate this draft.
Made-with: Claude Code (Fable 5)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
The self-sampling engine keeps no cross-step state, so the framework no
longer allocates it any: the per-layer gvr_prior_indices arena, the LJF
row-reorder buffer, prefill seeding, the aux-stream write-back, and the
indexer-side prior slice all key on needs_gvr_prior = two-level dispatch
selecting the temporal engine. A shared use_self_sampling_gvr() predicate
in dsa/params.py keeps the indexer's per-layer TopK construction and the
metadata's allocation decision in agreement (live indexers only exist on
cr in {1, 4} layers, matching the metadata's representative ratio). With
the CUDA heuristic gone, the temporal engine requires the CuTe DSL on
SM100/103; enable_heuristic_topk without it falls back to exact radix
with a one-time warning.
Made-with: Claude Code (Fable 5)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
… param Promote the emission-assisted block-skip optimization from the TRTLLM_GVR_EMISSION env var to a `use_gvr_emission` sparse-attention config field (default False). It only takes effect on the temporal-hint (V1) GVR path with FP4 paged-MQA logits; the self-sampling (V2) engine derives its bracket from the current row and never uses emission. Threads the field through llm_args -> model_config (V4 + V3.2 rebuilds) -> DSAParams / DSAMetadataParams -> the indexer gate, and adds config-threading unit tests. Made-with: Claude Code (Fable 5) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
…e GVR dispatch fields Adds the two new sparse-attention config fields (use_self_sampling_topk, use_gvr_emission; both bool, captured by value) via scripts/generate_llm_args_golden_manifest.py so test_build_capture_manifest_matches_committed_golden passes again. Made-with: Claude Code (Fable 5.1) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
Picks up the main-side waive of unittest/_torch/visual_gen/test_trtllm_serve_endpoints.py (NVIDIA#18685) that failed the CPU lanes in the previous CI round. Made-with: Claude Code (Fable 5.1) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
Picks up the main-side waive of unittest/_torch/visual_gen/test_trtllm_serve_e2e.py TestFlux1/Flux2TextToImage (nvbugs/6720944) that failed the DGX_B200 lane in the previous CI round. Made-with: Claude Code (Fable 5.1) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
Resolve tests/unittest/_torch/modules/test_top_k.py: keep the new CUTE_DSL_RADIX prefill-dispatch test, drop the removed CUDA_GVR workspace test, and drop the HEAD unsupported-impl test that now targets the main-supported CUTE_DSL_RADIX; keep the CUTE_DSL_GVR unsupported-prefill guard test (this branch has no GVR prefill form). Made-with: Claude Code (Opus 4.8) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
Stale-base artifact from the merge-from-main baseline, not a Rubin/GVR change; restore so the PR does not drop authorized users. Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
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.
Dependency
Built on #18446. Keep this PR in Draft and rebase after #18446 lands. Companion prefill work is in #18764.
Summary
use_gvr_locality_domainprototype that splits eligible decode requests across two Rubin locality domains.next_nrows together, with proportional partitioning based on the reported domain SM counts.Current scope
This is topology enablement plus an experimental GVR-only compute-sharding path, not a completed maximum-performance Rubin implementation.
TopKinstance before capture.Validation
Passed locally:
next_n, and symmetric/asymmetric topologies; all eligible plans were request-aligned, disjoint, and exhaustive.R200 kernel validation has not been completed. Full package/DSA pytest collection is blocked in the current environment by an external
bindings.somismatch (global_steady_clock_now), and the installed CuTe DSL does not provide the Rubin helper needed to compile the SM107 path. The stub tests are not a substitute for SM107 execution.Draft exit criteria
Before marking Ready, run correctness, stability, and performance A/B on R200 for:
next_nvalues.+/-inf; keep the existing NaN contract separate.The results must justify or retune the provisional dispatch gate and confirm that SM100/SM103 code generation and all fallbacks remain unchanged.