[https://nvbugs/6777501][fix] Fix nemotron breakable cuda graph test parity check - #19335
dominicshanshan wants to merge 1 commit into
Conversation
…mmune and use a trained prompt token test_nemotron_h_breakable_prefill_cuda_graph[tp1] flaked with "request 3: BCG first token not in eager top-2", with eager's own NVIDIA#2/NVIDIA#3 candidates swapping between runs. Request 3 is `[23] * 65`: in the Nemotron-3 tokenizer ids 0-513 are added control tokens and 23/31 are untrained <SPECIAL_n> placeholders (the prompt ids were ported from the Qwen3.5-4B parity test, where they are ordinary BPE tokens). Repeating an untrained token yields a flat next-token distribution whose leading candidates tie within run-to-run noise, so a rank test on BCG's greedy pick is a coin flip even though the distributions agree within the accepted log-prob bound. Padding-induced MoE drift under BCG only reorders those near-tied candidates. - Build every prompt from id 17 (`</tool_response>`, trained); block reuse is off by default for NemotronH so the shared prefix is never reused. - Replace the top-2 membership assertion with a symmetric margin check: each arm's greedy pick must lie within _BCG_LOGPROB_TOLERANCE of the other arm's pick under the other arm's distribution. Near ties pass, genuine divergence still fails. - Drop the waives.txt entry. Verified on H100 with Nano-30B-A3B-BF16: tp1 and tp2 pass (worst first-token log-prob diff 0.16 / 0.24 nats, greedy-pick margin 0.0 nats). Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
24fcf49 to
9233f6b
Compare
|
/bot run |
|
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)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughThe Nemotron-H CUDA-graph test now uses token 17 consistently and validates eager and BCG greedy-token probability margins. The associated skip waiver was removed. ChangesNemotron-H validation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The validation now uses the trained prompt token and checks both greedy-token probability margins, while the matching tp1 waiver is removed. The change is ready to merge with normal test validation. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
|
PR_Github #74057 [ run ] triggered by Bot. Commit: |
|
PR_Github #74057 [ run ] completed with state
|
|
/bot run |
|
PR_Github #74098 [ run ] triggered by Bot. Commit: |
|
PR_Github #74098 [ run ] completed with state
|
Verified on local H100 with Nano-30B-A3B-BF16: tp1 and tp2 pass (worst first-token log-prob diff 0.16 / 0.24 nats, greedy-pick margin 0.0 nats).
Dev Engineer Review
NVBUG 6777501waiver.QA Engineer Review
test_nemotron_h_breakable_prefill_cuda_graph(tp_size).tp1waiver fromwaives.txt.l0_h100.ymlfortp1l0_dgx_h100.ymlfortp2tp1and 0.24 nats fortp2.Per-File QA Perspective
tests/unittest/_torch/modeling/test_modeling_nemotron_h.py: Validates Nemotron breakable prefill CUDA graph parity across single- and multi-request scenarios. Thetp1andtp2test variants are listed in the H100 CI test-db configurations.tests/integration/test_lists/waives.txt: Removes thetp1skip entry fortest_nemotron_h_breakable_prefill_cuda_graph, allowing the test to run in CI.Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.