[Hardware][AMD][CI] Use Triton-based AITER MHA for LM Eval Qwen-3.5 Models Tests (#46691)

Signed-off-by: Matthew Wong <Matthew.Wong2@amd.com>
This commit is contained in:
Matt
2026-06-25 17:08:04 -05:00
committed by GitHub
parent a2e8ec3d52
commit 27da2a2ac4
3 changed files with 9 additions and 6 deletions
+5 -1
View File
@@ -12,6 +12,8 @@ latencies by ~7% (see qwen2_5_vl for example usage)
To use these ops, you must have a recent version of PyTorch installed (>= 2.4.0)
"""
from typing import Any
import einops
import torch
import torch.nn.functional as F
@@ -31,9 +33,11 @@ def flash_attn_maxseqlen_wrapper(
cu_seqlens: torch.Tensor | None = None,
max_seqlen: torch.Tensor | None = None,
) -> torch.Tensor:
kwargs = {}
kwargs: dict[str, Any] = {}
if is_rocm_aiter:
from aiter import flash_attn_varlen_func
kwargs["window_size"] = (-1, -1)
else:
from vllm.v1.attention.backends.fa_utils import flash_attn_varlen_func