[Bugfix][ROCm] Preserve MoE weight padding for unquantized Triton path (#46381)
Signed-off-by: Uros Markovic <umarkovi@amd.com>
Uros Markovic committed
Jun 30, 2026 at 08:47 UTC
81bcced48273cce230dcd5a4cee0cfe0ad6dbd26
1 file changed
+7
vllm/model_executor/layers/fused_moe/oracle/unquantized.py
+7
@@ -301,6 +301,13 @@ def convert_to_unquantized_kernel_format(
301
is_gated_act_gemm=is_act_and_mul,
302
)
303
304
+ if (
305
+ unquantized_backend == UnquantizedMoeBackend.TRITON
306
+ and current_platform.is_rocm()
307
+ and envs.VLLM_ROCM_MOE_PADDING
308
+ ):
309
+ # Skip .contiguous(): it would undo the ROCm MoE weight padding.
310
+ return w13_weight, w2_weight
311
return w13_weight.contiguous(), w2_weight.contiguous()
312
313