[ROCm][Perf] Pad fp16/bf16 GEMM weight row stride for L2 cache (#55090)

Signed-off-by: Matthias Gehre <matthias.gehre@amd.com>
This commit is contained in:
Matthias Gehre
2026-10-15 14:26:32 +00:00
committed by GitHub
parent d12d5460a5
commit 011fa68ca9
3 changed files with 198 additions and 13 deletions
+3
View File
@@ -31,6 +31,7 @@ from vllm.model_executor.layers.quantization.base_config import (
)
from vllm.model_executor.layers.utils import (
dispatch_unquantized_gemm,
maybe_pad_weight_avoid_cache_aliasing,
)
from vllm.model_executor.parameter import (
BasevLLMParameter,
@@ -225,6 +226,8 @@ class UnquantizedLinearMethod(LinearMethodBase):
and weight.stride(0) != 1
):
layer.weight.data = weight.t().contiguous().t()
elif current_platform.is_rocm():
layer.weight.data = maybe_pad_weight_avoid_cache_aliasing(layer.weight.data)
def apply(
self,