[Hardware][intel GPU] bump up ipex version to 2.3 (#8365)

Co-authored-by: Yan Ma <yan.ma@intel.com>
This commit is contained in:
Kunshang Ji
2024-09-13 16:54:34 -07:00
committed by GitHub
co-authored by Yan Ma
parent 9ba0817ff1
commit 851725202a
6 changed files with 60 additions and 87 deletions
+6 -2
View File
@@ -49,14 +49,18 @@ class IpexAttnBackend(AttentionBackend):
dst_kv_cache: torch.Tensor,
src_to_dst: torch.Tensor,
) -> None:
PagedAttention.swap_blocks(src_kv_cache, dst_kv_cache, src_to_dst)
from vllm._ipex_ops import ipex_ops as ops
ops.swap_blocks(src_kv_cache, dst_kv_cache, src_to_dst)
@staticmethod
def copy_blocks(
kv_caches: List[torch.Tensor],
src_to_dists: torch.Tensor,
) -> None:
PagedAttention.copy_blocks(kv_caches, src_to_dists)
from vllm._ipex_ops import ipex_ops as ops
key_caches = [kv_cache[0] for kv_cache in kv_caches]
value_caches = [kv_cache[1] for kv_cache in kv_caches]
ops.copy_blocks(key_caches, value_caches, src_to_dists)
@dataclass