Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment/behavior mismatch: expert parallelism is now hard-disabled with no caller override.
Line 113 says EP can be enabled explicitly by callers, but this wrapper has no
moe_expert_parallel_sizeinput and always setsep = 1(propagated at Line 145). That makes EP impossible to enable through this API and can regress MoE multi-GPU setups that expect configurable EP (as shown inexamples/specdec_bench/specdec_bench/models/trtllm_torch_api.pyandexamples/speculative_decoding/collect_hidden_states/compute_hidden_states_trtllm.py).Suggested fix
class LLM(TRTLLM): def __init__( self, checkpoint_dir: str | Path, tokenizer: "str | Path | None" = None, medusa_choices: Any = None, tp: int = 0, + moe_expert_parallel_size: int | None = None, trust_remote_code: bool = False, max_seq_len: int = 0, max_batch_size: int = 0, ): @@ - # Force ep=1 to avoid TRT-LLM DeepEP kernel failures on unsupported GPUs - # (e.g. Blackwell SM 12.0). Expert parallelism can be enabled explicitly - # by the caller when the environment is known to support it. - ep = 1 + # Default to EP=1 to avoid TRT-LLM DeepEP kernel failures on unsupported GPUs. + # Allow explicit override when the caller knows the environment supports EP. + ep = 1 if moe_expert_parallel_size is None else moe_expert_parallel_size🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjluo-nv is this important to address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it just mean when TRT LLM supports it, we will remove the hardcoded EP. Should be ok