A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 5, 22:15 UTC
{ROCm]: gpt-oss fusion/padding fixes (#38043)
Signed-off-by: Andreas Karatzas <akaratza@amd.com> Signed-off-by: Rohan138 <rohanpotdar138@gmail.com> Signed-off-by: Rohan Potdar <66227218+Rohan138@users.noreply.github.com> Co-authored-by: Andreas Karatzas <akaratza@amd.com>
Rohan Potdar committed
Mar 27, 2026 at 11:19 UTC
0e9358c11daf3f5a2d4e8f80a100b6d5e070e1a1
3 files changed
+4
-19
vllm/config/vllm.py
+1
-3
@@ -152,13 +152,11 @@ def enable_rope_kvcache_fusion(cfg: "VllmConfig") -> bool:
152
153
154
def enable_norm_pad_fusion(cfg: "VllmConfig") -> bool:
155
- """Enable if using AITER RMSNorm and AITER Triton GEMMs
156
- and hidden size is 2880 i.e. gpt-oss; otherwise Inductor handles fusion."""
155
+ """Enable if using AITER RMSNorm and hidden size is 2880 i.e. gpt-oss."""
156
from vllm._aiter_ops import rocm_aiter_ops
157
158
return (
159
rocm_aiter_ops.is_rmsnorm_enabled()
161
- and not rocm_aiter_ops.is_triton_gemm_enabled()
160
and cfg.model_config is not None
161
and cfg.model_config.get_hidden_size() == 2880
162
)
vllm/model_executor/layers/fused_moe/oracle/mxfp4.py
+3
-7
@@ -20,10 +20,7 @@ from vllm.model_executor.layers.fused_moe.config import (
20
mxfp4_w4a16_moe_quant_config,
21
ocp_mx_moe_quant_config,
22
)
23
-from vllm.model_executor.layers.quantization.utils.mxfp4_utils import (
24
- _swizzle_mxfp4,
25
- get_padding_alignment,
26
-)
23
+from vllm.model_executor.layers.quantization.utils.mxfp4_utils import _swizzle_mxfp4
24
from vllm.model_executor.layers.quantization.utils.quant_utils import (
25
QuantKey,
26
kMxfp4Static,
@@ -396,9 +393,8 @@ def mxfp4_round_up_hidden_size_and_intermediate_size(
393
intermediate_size = round_up(intermediate_size, 128)
394
hidden_size = round_up(hidden_size, 128)
395
elif current_platform.is_rocm():
399
- pad_align = get_padding_alignment()
400
- intermediate_size = round_up(intermediate_size, pad_align)
401
- hidden_size = round_up(hidden_size, pad_align)
396
+ intermediate_size = round_up(intermediate_size, 256)
397
+ hidden_size = round_up(hidden_size, 256)
398
else:
399
intermediate_size = round_up(intermediate_size, 64)
400
return hidden_size, intermediate_size
vllm/model_executor/layers/quantization/utils/mxfp4_utils.py
-9
@@ -6,7 +6,6 @@ import torch
6
7
from vllm.logger import init_logger
8
from vllm.platforms import current_platform
9
-from vllm.triton_utils import triton
9
from vllm.utils.import_utils import has_triton_kernels
10
from vllm.utils.torch_utils import direct_register_custom_op, is_torch_equal_or_newer
11
@@ -85,14 +84,6 @@ def _swizzle_mxfp4(quant_tensor, scale, num_warps=8):
84
return quant_tensor, InFlexData(), scale
85
86
88
-def get_padding_alignment():
89
- return (
90
- 256
91
- if triton.runtime.driver.active.get_current_target().arch in ("gfx950",)
92
- else 128
93
- )
94
-
95
-
87
def _dequant_mxfp4(
88
x: torch.Tensor, scale: torch.Tensor, float_dtype: torch.dtype
89
) -> torch.Tensor: