[ROCm][CI][Bugfix] Fixing the Multi-Modal Models Test (Extended) 1 group (#30013)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
Andreas Karatzas
2025-12-04 11:00:16 +00:00
committed by GitHub
parent 6366c098d7
commit e96a6a6dca
10 changed files with 139 additions and 9 deletions
+13 -1
View File
@@ -31,6 +31,7 @@ from vllm.logger import init_logger
from vllm.model_executor.layers.batch_invariant import (
vllm_is_batch_invariant,
)
from vllm.platforms import current_platform
from vllm.utils.math_utils import cdiv
from vllm.utils.torch_utils import is_torch_equal_or_newer
from vllm.v1.attention.backends.utils import (
@@ -927,7 +928,18 @@ def get_kernel_options(
if torch.cuda.is_available():
device_props = torch.cuda.get_device_properties()
max_shared_memory = device_props.shared_memory_per_block_optin
# ROCm doesn't expose shared_memory_per_block_optin attribute
# AMD GPUs typically have 64KB LDS (Local Data Share) per workgroup
if hasattr(device_props, "shared_memory_per_block_optin"):
max_shared_memory = device_props.shared_memory_per_block_optin
elif current_platform.is_rocm():
# ROCm fallback: use 64KB
max_shared_memory = 65536
else:
raise RuntimeError(
"Unable to determine shared memory size on this hardware."
)
if max_shared_memory < 144 * 1024:
block_m_candidate = ensure_divisible(
max(1, block_m_candidate // 2), block_m