Unverified Commit 608914de authored by Frederik Gossen's avatar Frederik Gossen Committed by GitHub
Browse files

[Core] Re-enable Inductor pre-grad passes in standalone compile (torch>=2.12) (#38944)


Signed-off-by: default avatarFrederik Gossen <frgossen@meta.com>
parent 4ae218c1
...@@ -345,9 +345,9 @@ class InductorStandaloneAdaptor(CompilerInterface): ...@@ -345,9 +345,9 @@ class InductorStandaloneAdaptor(CompilerInterface):
# Inductor's pre-grad passes don't do anything for vLLM. # Inductor's pre-grad passes don't do anything for vLLM.
# The pre-grad passes get run even on cache-hit and negatively impact # The pre-grad passes get run even on cache-hit and negatively impact
# vllm cold compile times by O(1s) # vllm cold compile times by O(1s)
# Can remove this after the following issue gets fixed # Fixed upstream in PyTorch 2.12:
# https://github.com/pytorch/pytorch/issues/174502 # https://github.com/pytorch/pytorch/issues/174502
if envs.VLLM_ENABLE_PREGRAD_PASSES: if is_torch_equal_or_newer("2.12.0.dev") or envs.VLLM_ENABLE_PREGRAD_PASSES:
pregrad_ctx: Any = contextlib.nullcontext() pregrad_ctx: Any = contextlib.nullcontext()
else: else:
pregrad_ctx = patch( pregrad_ctx = patch(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment