[torch.compile] Disable recursive pre_grad_passes (#34092)
Signed-off-by: Richard Zou <zou3519@gmail.com>
This commit is contained in:
10
vllm/envs.py
10
vllm/envs.py
@@ -132,6 +132,7 @@ if TYPE_CHECKING:
|
||||
VLLM_DP_RANK_LOCAL: int = -1
|
||||
VLLM_DP_SIZE: int = 1
|
||||
VLLM_USE_STANDALONE_COMPILE: bool = True
|
||||
VLLM_ENABLE_PREGRAD_PASSES: bool = False
|
||||
VLLM_DP_MASTER_IP: str = ""
|
||||
VLLM_DP_MASTER_PORT: int = 0
|
||||
VLLM_MOE_DP_CHUNK_SIZE: int = 256
|
||||
@@ -568,6 +569,15 @@ environment_variables: dict[str, Callable[[], Any]] = {
|
||||
"VLLM_USE_STANDALONE_COMPILE", "1"
|
||||
)
|
||||
== "1",
|
||||
# Inductor's pre-grad passes don't do anything for vLLM.
|
||||
# The pre-grad passes get run even on cache-hit and negatively impact
|
||||
# vllm cold compile times by O(1s)
|
||||
# Can remove this after the following issue gets fixed
|
||||
# https://github.com/pytorch/pytorch/issues/174502
|
||||
"VLLM_ENABLE_PREGRAD_PASSES": lambda: os.environ.get(
|
||||
"VLLM_ENABLE_PREGRAD_PASSES", "0"
|
||||
)
|
||||
== "1",
|
||||
# Debug pattern matching inside custom passes.
|
||||
# Should be set to the fx.Node name (e.g. 'getitem_34' or 'scaled_mm_3').
|
||||
"VLLM_PATTERN_MATCH_DEBUG": lambda: os.environ.get(
|
||||
|
||||
Reference in New Issue
Block a user