From 53c2f20dd9f1ead9c4a086e5103af7f8a74681a2 Mon Sep 17 00:00:00 2001 From: Divakar Verma <137818590+divakar-amd@users.noreply.github.com> Date: Wed, 22 Jul 2026 11:18:01 -0400 Subject: [PATCH] [ROCm][CI] skip moe weight padding for eplb (#49350) Signed-off-by: Divakar Verma --- .../layers/fused_moe/unquantized_fused_moe_method.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vllm/model_executor/layers/fused_moe/unquantized_fused_moe_method.py b/vllm/model_executor/layers/fused_moe/unquantized_fused_moe_method.py index 7a2c670a8c..d913e9ad67 100644 --- a/vllm/model_executor/layers/fused_moe/unquantized_fused_moe_method.py +++ b/vllm/model_executor/layers/fused_moe/unquantized_fused_moe_method.py @@ -139,10 +139,13 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, CustomOp): def _maybe_pad_weight(self, weight: torch.Tensor) -> torch.Tensor: # Pad the weight tensor. This is an optimization on ROCm platform, which - # can benefit from tensors located far enough from one another in memory + # can benefit from tensors located far enough from one another in memory. + # Skip padding when EPLB is enabled because EPLB requires contiguous + # weights for the view/rearrangement operations. if ( envs.VLLM_ROCM_MOE_PADDING and current_platform.is_rocm() + and not self.moe.moe_parallel_config.enable_eplb and weight.stride(-1) == 1 and (weight.stride(-2) * weight.element_size()) % 512 == 0 ):