Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions tensorrt_llm/_torch/auto_deploy/config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ transforms:
sharding_source: ['manual', 'factory', 'heuristic']
support_partial_config: true
sharding_dims: ['tp', 'ep', 'bmm']
shard_all_unprocessed: true
allreduce_strategy: 'NCCL'
dist_backend: auto
requires_shape_prop: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ class ShardingTransformConfig(TransformConfig):
sharding_dims: List[ShardingDim] = Field(
default_factory=lambda: [ShardingDim.TP, ShardingDim.EP, ShardingDim.BMM]
)
shard_all_unprocessed: bool = Field(
default=False,
description="When True, apply simple shard (column split + all_gather) to "
"'leftover' linear nodes that are not part of any layer subgraph.",
)
allreduce_strategy: AllReduceStrategy = Field(
default=AllReduceStrategy.AUTO,
description="AllReduce strategy for distributed operations. "
Expand Down Expand Up @@ -2608,7 +2613,8 @@ def detect_column_row_shard(
num_attention_shards += 1

# simple shard remaining linear nodes
num_simple_shards += _process_simple_shard(unprocessed_linear_nodes, transform_container)
if config.shard_all_unprocessed:
num_simple_shards += _process_simple_shard(unprocessed_linear_nodes, transform_container)
num_column_row_shards += num_ssm_shards
num_shards = num_simple_shards + num_column_row_shards
ad_logger.info(
Expand Down