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 4, 02:30 UTC
[XPU] remove q/k/v force contiguous for flash_attn (#40356)
Signed-off-by: Yan Ma <yan.ma@intel.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
Yan Ma committed
May 9, 2026 at 09:19 UTC
be0dcc29dcfa83659e6857dd73cb527b5986a7f9
1 file changed
+1
-6
vllm/_xpu_ops.py
+1
-6
@@ -387,14 +387,9 @@ class xpu_ops:
387
assert len(window_size) == 2
388
real_window_size = (window_size[0], window_size[1]) # noqa: F841
389
390
- # In encode attention, k and v maybe not contiguous and current
391
- # kernel can't handle it
392
- if block_table is None:
393
- k = k.contiguous()
394
- v = v.contiguous()
390
return flash_attn_varlen_func(
391
out=out,
397
- q=q.contiguous(),
392
+ q=q,
393
k=k,
394
v=v,
395
cu_seqlens_q=cu_seqlens_q,