Repository navigation
[None][fix] Reduce deterministic GVR V2 top-K overflow overhead - #20290
Conversation
Use exact warp-prefix recovery for every non-split main block size, separate sampling capacity from staging headroom, and budget shared memory for clustered logits. Extend deterministic regression coverage with large batches and odd valid lengths. Signed-off-by: longcheng-nv <243710427+longcheng-nv@users.noreply.github.com>
|
/bot run |
|
PR_Github #77809 [ run ] triggered by Bot. Commit: |
|
PR_Github #77809 [ run ] completed with state
|
|
/bot run --reuse-test |
|
PR_Github #77958 [ run ] triggered by Bot. Commit: |
|
PR_Github #77958 [ run ] completed with state
|
|
/bot run --reuse-test --disable-fail-fast |
|
PR_Github #78022 [ run ] triggered by Bot. Commit: |
|
PR_Github #78022 [ run ] completed with state
|
|
/bot run --reuse-test --disable-fail-fast |
|
PR_Github #78270 [ run ] triggered by Bot. Commit: |
|
PR_Github #78270 [ run ] completed with state |
|
Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements. |
Description
Fix excessive overhead in deterministic GVR V2 top-K, especially at K=1024 and K=2048. Follow-up to #20100.
With clustered logits, a few warps receive most of the candidates. Their local buffers can overflow even when the shared buffer has enough total space, triggering an expensive scan of the whole row.
This fix:
Measured improvement
At BS=512 and N≈131,000, added cost drops from 208–221 µs to 1.05–2.76 µs.
Each row compares identical input tensors on the same B200, using nsys + cold L2. Overhead is relative to the default-path control in each run.
Final performance across the full grid
B200 · nsys + cold L2 · 275 captured-logit shapes · all 11 power-of-two batch sizes from 1 to 1024.
Overhead below is relative to the default path, using
deterministic=Truewith per-route output order.Inputs are model logits captured from random-token prompts, with stored rows reused to form batches.
Test Coverage
Measurement and validation details
2807acd470e6; after values use the final source matching PR commit358db83774. Input hashes, GPU identity and timing settings were checked for every comparison.Focused regression command in an installed TensorRT-LLM environment on B200:
PR Checklist
Regression coverage is included and local checks passed.
API, dependency and ownership changes: none.
CI results and reviewer approvals are tracked in GitHub checks and reviews.
Please check this after reviewing the above items as appropriate for this PR.