[https://nvbugs/5451740][fix] Add DP padding back on SM120 - #7965
Conversation
|
/bot run |
📝 WalkthroughWalkthroughAdds SM120-specific DP padding logic to compute_routed_output paths, conditionally padding hidden_states and propagating a use_dp_padding flag through routing/experts. Updates imports to expose CutlassFusedMoE and WideEPMoE and drop MoEWeightLoadingMode. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant Model as compute_routed_output
participant Router as Routing Method
participant Experts as MoE Experts
Caller->>Model: forward(hidden_states, ...)
Note over Model: Determine use_dp_padding if SM120 && TP>1 &&\n(MoE type/FP8/QDQ conditions)
alt use_dp_padding = true
Model->>Model: Pad hidden_states (token dim) to max tokens across ranks
end
Model->>Router: route(hidden_states, use_dp_padding)
Router-->>Model: routing logits / assignments
Model->>Experts: dispatch(hidden_states, assignments, use_dp_padding)
Experts-->>Model: expert outputs (padded if enabled)
alt use_dp_padding = true
Model->>Model: Depad outputs to original token lengths
end
Model-->>Caller: routed output
Note right of Model: Same flow mirrored in Deepseekv3MoE.compute_routed_output
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh,py}📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Files:
**/*.py📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Files:
**/*.{cpp,cxx,cc,h,hpp,hh,hxx,cu,cuh,py}📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-09-19T21:28:13.751ZApplied to files:
🧬 Code graph analysis (1)tensorrt_llm/_torch/models/modeling_deepseekv3.py (4)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
|
PR_Github #19824 [ run ] triggered by Bot |
|
PR_Github #19824 [ run ] completed with state |
28053d7 to
bb6a85c
Compare
|
/bot run |
|
/bot run |
|
PR_Github #19864 [ run ] triggered by Bot |
|
PR_Github #19865 [ run ] triggered by Bot |
|
PR_Github #19864 [ run ] completed with state |
|
/bot run |
|
PR_Github #19872 [ run ] triggered by Bot |
|
PR_Github #19865 [ run ] completed with state |
|
/bot run |
|
PR_Github #19875 [ run ] triggered by Bot |
|
PR_Github #19872 [ run ] completed with state |
Signed-off-by: peaceh <103117813+peaceh-nv@users.noreply.github.com>
Signed-off-by: peaceh <103117813+peaceh-nv@users.noreply.github.com>
Signed-off-by: peaceh <103117813+peaceh-nv@users.noreply.github.com>
Signed-off-by: peaceh <103117813+peaceh-nv@users.noreply.github.com>
Signed-off-by: peaceh <103117813+peaceh-nv@users.noreply.github.com>
3c84849 to
512195c
Compare
|
/bot run |
|
PR_Github #19890 [ run ] triggered by Bot |
|
PR_Github #19875 [ run ] completed with state |
|
/bot run |
|
PR_Github #19893 [ run ] triggered by Bot |
|
PR_Github #19890 [ run ] completed with state |
|
PR_Github #19893 [ run ] completed with state |
|
/bot run |
|
PR_Github #20008 [ run ] triggered by Bot |
|
PR_Github #20008 [ run ] completed with state |
Signed-off-by: peaceh <103117813+peaceh-nv@users.noreply.github.com>
Signed-off-by: peaceh <103117813+peaceh-nv@users.noreply.github.com>
Signed-off-by: peaceh <103117813+peaceh-nv@users.noreply.github.com>
Signed-off-by: peaceh <103117813+peaceh-nv@users.noreply.github.com>
Description
Summary by CodeRabbit
New Features
Bug Fixes