[CI] Register CPU CI "VLLM_CPU_CI_ENV" environment variable (#52633)
Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
This commit is contained in:
@@ -51,6 +51,7 @@ if TYPE_CHECKING:
|
|||||||
VLLM_CPU_KVCACHE_SPACE: int | None = 0
|
VLLM_CPU_KVCACHE_SPACE: int | None = 0
|
||||||
VLLM_CPU_OMP_THREADS_BIND: str = "auto"
|
VLLM_CPU_OMP_THREADS_BIND: str = "auto"
|
||||||
VLLM_CPU_NUM_OF_RESERVED_CPU: int | None = None
|
VLLM_CPU_NUM_OF_RESERVED_CPU: int | None = None
|
||||||
|
VLLM_CPU_CI_ENV: bool = False
|
||||||
VLLM_CPU_ATTN_SPLIT_KV: bool = True
|
VLLM_CPU_ATTN_SPLIT_KV: bool = True
|
||||||
VLLM_ZENTORCH_WEIGHT_PREPACK: bool = True
|
VLLM_ZENTORCH_WEIGHT_PREPACK: bool = True
|
||||||
VLLM_CPU_INT4_W4A8: bool = True
|
VLLM_CPU_INT4_W4A8: bool = True
|
||||||
@@ -885,6 +886,8 @@ environment_variables: dict[str, Callable[[], Any]] = {
|
|||||||
if "VLLM_CPU_NUM_OF_RESERVED_CPU" in os.environ
|
if "VLLM_CPU_NUM_OF_RESERVED_CPU" in os.environ
|
||||||
else None
|
else None
|
||||||
),
|
),
|
||||||
|
# (CPU backend only) whether vLLM is running in a CI environment.
|
||||||
|
"VLLM_CPU_CI_ENV": lambda: bool(int(os.getenv("VLLM_CPU_CI_ENV", "0"))),
|
||||||
# (CPU backend only) whether to enable attention spilt KV.
|
# (CPU backend only) whether to enable attention spilt KV.
|
||||||
"VLLM_CPU_ATTN_SPLIT_KV": lambda: bool(
|
"VLLM_CPU_ATTN_SPLIT_KV": lambda: bool(
|
||||||
int(os.getenv("VLLM_CPU_ATTN_SPLIT_KV", "1"))
|
int(os.getenv("VLLM_CPU_ATTN_SPLIT_KV", "1"))
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ from typing import TYPE_CHECKING
|
|||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
|
from vllm import envs
|
||||||
from vllm.logger import init_logger
|
from vllm.logger import init_logger
|
||||||
from vllm.utils.cpu_resource_utils import (
|
from vllm.utils.cpu_resource_utils import (
|
||||||
DEVICE_CONTROL_ENV_VAR,
|
DEVICE_CONTROL_ENV_VAR,
|
||||||
@@ -203,10 +204,7 @@ class CpuPlatform(Platform):
|
|||||||
# cache. So use VLLM_CPU_CI_ENV to indicate the CI environment,
|
# cache. So use VLLM_CPU_CI_ENV to indicate the CI environment,
|
||||||
# and just execute model with dynamo + eager mode to save time.
|
# and just execute model with dynamo + eager mode to save time.
|
||||||
# VLLM_CPU_CI_ENV is only used as an internal variable.
|
# VLLM_CPU_CI_ENV is only used as an internal variable.
|
||||||
if os.environ.get("VLLM_CPU_CI_ENV", "0") != "0":
|
backend = "eager" if envs.VLLM_CPU_CI_ENV else "inductor"
|
||||||
backend = "eager"
|
|
||||||
else:
|
|
||||||
backend = "inductor"
|
|
||||||
|
|
||||||
compilation_config.mode = CompilationMode.DYNAMO_TRACE_ONCE
|
compilation_config.mode = CompilationMode.DYNAMO_TRACE_ONCE
|
||||||
compilation_config.backend = backend
|
compilation_config.backend = backend
|
||||||
|
|||||||
Reference in New Issue
Block a user