@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / d2dc5dfc6e
Fork 0

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 11, 05:00 UTC

[Bugfix] Remove `tile_size=64` for mm_prefix triton attention (#30973)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>

Isotr0py committed Dec 19, 2025 at 03:42 UTC d2dc5dfc6ecafbd3d725c1c42dd019db2b1efd30
1 file changed -7
vllm/attention/ops/triton_unified_attention.py
-7
@@ -800,7 +800,6 @@ def _get_tile_size(
800 head_size: int,
801 sliding_window: int,
802 element_size: int,
803 - is_mm_prefix: bool,
803 is_prefill: bool,
804 ) -> int:
805 """Select tile size with Gemma3-specific optimization.
@@ -809,10 +808,6 @@ def _get_tile_size(
808 the larger head dimension (128/256). For other models, use
809 the default vLLM behavior.
810 """
812 - if is_mm_prefix:
813 - # Multimodal bidirectional attention needs a larger tile size
814 - return 64
815 -
811 if _is_gemma3_attention(head_size, sliding_window):
812 # Gemma3: use 32 for decode (default is 16)
813 return 32
@@ -903,14 +898,12 @@ def unified_attention(
898 head_size,
899 sliding_window_val,
900 q.element_size(),
906 - is_mm_prefix=use_mm_prefix,
901 is_prefill=True,
902 )
903 TILE_SIZE_DECODE = _get_tile_size(
904 head_size,
905 sliding_window_val,
906 q.element_size(),
913 - is_mm_prefix=use_mm_prefix,
907 is_prefill=False,
908 )
909