[amd][gptoss] Perf gain because of block alignment (#28024)

Signed-off-by: Smit Kadvani <smit.kadvani@gmail.com>
Co-authored-by: Smit Shaileshbhai Kadvani <kadvani@meta.com>
This commit is contained in:
smit kadvani
2025-11-06 21:27:42 -08:00
committed by GitHub
parent c0a4b95d64
commit 11fd69dd54
2 changed files with 13 additions and 2 deletions

View File

@@ -43,6 +43,7 @@ from vllm.model_executor.layers.quantization.utils.marlin_utils_fp4 import (
from vllm.model_executor.layers.quantization.utils.mxfp4_utils import (
_can_support_mxfp4,
_swizzle_mxfp4,
get_padding_alignment,
)
from vllm.model_executor.layers.quantization.utils.quant_utils import is_layer_skipped
from vllm.model_executor.utils import set_weight_attrs
@@ -282,10 +283,11 @@ class Mxfp4MoEMethod(FusedMoEMethodBase):
)
hidden_size = round_up(hidden_size, 128)
elif current_platform.is_rocm():
pad_align = get_padding_alignment()
intermediate_size_per_partition_after_pad = round_up(
intermediate_size_per_partition, 256
intermediate_size_per_partition, pad_align
)
hidden_size = round_up(hidden_size, 256)
hidden_size = round_up(hidden_size, pad_align)
else:
intermediate_size_per_partition_after_pad = round_up(
intermediate_size_per_partition, 64