Profile MoE TP-local shards without collectives
This commit is contained in:
@@ -199,8 +199,12 @@ def main() -> None:
|
||||
in_dtype=torch.bfloat16,
|
||||
max_num_tokens=max_num_tokens,
|
||||
)
|
||||
# This process profiles one TP-local weight shard. Keep the global
|
||||
# runtime context single-rank so vLLM does not initialize a collective;
|
||||
# the action-conditioned shard size remains explicit in moe_config and
|
||||
# the real TP2/TP4 all-reduce is profiled in a separate multi-GPU run.
|
||||
vllm_config = VllmConfig(
|
||||
parallel_config=ParallelConfig(tensor_parallel_size=tp)
|
||||
parallel_config=ParallelConfig(tensor_parallel_size=1)
|
||||
)
|
||||
with set_current_vllm_config(vllm_config):
|
||||
backend, experts_cls = select_unquantized_moe_backend(moe_config)
|
||||
@@ -348,8 +352,8 @@ def main() -> None:
|
||||
"norm_topk_prob": True,
|
||||
},
|
||||
"measurement_scope": (
|
||||
"vLLM modular MoE prepare+FlashInfer CUTLASS experts+finalize; "
|
||||
"router linear/top-k and TP all-reduce excluded"
|
||||
"one TP-local weight shard: vLLM modular MoE prepare+FlashInfer "
|
||||
"CUTLASS experts+finalize; router linear/top-k and TP all-reduce excluded"
|
||||
),
|
||||
"rows": rows,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user