Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tensorrt_llm/_torch/models/modeling_deepseekv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,14 @@ def compute_routed_output(self, hidden_states, hidden_states_fp4,
all_rank_num_tokens, do_finalize):
# max-throughput
use_dp_padding = False
# Add DP padding on SM120 for context comm performance
Comment thread
peaceh-nv marked this conversation as resolved.
# TODO: Move this model-agonostic part to MoE
if self.use_dp and self.mapping.tp_size > 1 and get_sm_version() == 120:
use_dp_padding = True
hidden_states = torch.nn.functional.pad(
hidden_states,
(0, 0, 0, max(all_rank_num_tokens) - hidden_states.shape[0]))

router_logits = self.gate(hidden_states)

routed_output = self.experts(
Expand Down