File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import os
4
4
import sys
5
+ from importlib .util import find_spec
5
6
from typing import TYPE_CHECKING , Optional
6
7
7
8
import psutil
@@ -68,8 +69,15 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
68
69
69
70
cache_config = vllm_config .cache_config
70
71
72
+ ipex_avaliable = find_spec ("intel_extension_for_pytorch" ) is not None
73
+
71
74
if cache_config and cache_config .block_size is None :
72
- cache_config .block_size = 16
75
+ cache_config .block_size = 128 if ipex_avaliable else 16
76
+
77
+ if not ipex_avaliable and cache_config .block_size != 16 :
78
+ raise RuntimeError (
79
+ f"--block-size={ cache_config .block_size } requires"
80
+ " intel_extension_for_pytorch" )
73
81
74
82
scheduler_config = vllm_config .scheduler_config
75
83
if ((scheduler_config .chunked_prefill_enabled
You can’t perform that action at this time.
0 commit comments