[https://nvbugs/6276842][fix] Replace the two-case warmup distribution with a single shape: one real request… - #15146
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe PR simplifies the encoder warmup input construction logic in the PyExecutor model engine by replacing a two-case token distribution strategy with a unified "runtime-mirror" approach that caps the first sequence length and appends single-token dummy entries. The previously-waived decoder encode test is removed from the waives list, indicating the logic fix resolves the test failure. ChangesEncoder Warmup Simplification
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…gime Encoder CUDA graph capture was warming up with ``_create_encoder_warmup_inputs`` synthesizing ``seq_lens`` summing to exactly ``padded_num_tokens`` (the bucket's token capacity), evenly distributing tokens across the batch. At runtime ``pad_batch`` inserts 1-token dummies for the padding entries, so the live ``seq_lens`` look like ``[real_prompt_lens..., 1, 1, ...]`` summing to less than ``padded_num_tokens``. This asymmetry caused the captured FMHA kernel and the tokensInfo seqEnd-extension path in ``invokeBuildDecoderInfo`` to operate in a different regime than the one replayed, producing logits that drift well beyond the 1e-3 tolerance ``test_decoder_encode_cuda_graph_matches_eager_logits`` expects on Ada (L40S, SM89). Replace the two-case distribution with a single shape that mirrors runtime: one real request capped at ``min(max_seq_len, num_tokens - (batch_size - 1))`` plus ``batch_size - 1`` 1-token dummies. The bucket selection still picks ``(bs, padded_num_tokens, padded_max_seq_len)`` because the capture-time ``num_tokens`` falls into the same bucket (smaller-or-equal on the ``num_tokens`` axis). Drop the now-needless ``waives.txt`` entry. Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
5829292 to
84b946a
Compare
Summary
min(max_seq_len, num_tokens - (batch_size - 1))plus(batch_size - 1)1-token dummies — directly mirroring howpad_batchshapes the runtime input. Drop the now-passing test fromwaives.txt.Test plan
Links
Summary by CodeRabbit
Refactor
Tests