Skip to content

Commit

Permalink
[torch.compile] force inductor threads (#10620)
Browse files Browse the repository at this point in the history
Signed-off-by: Jee Jee Li <[email protected]>
  • Loading branch information
jeejeelee authored Nov 25, 2024
1 parent a30a605 commit 7c2134b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vllm/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from contextlib import contextmanager
from typing import TYPE_CHECKING, Optional

import torch

import vllm.envs as envs

if TYPE_CHECKING:
Expand All @@ -26,7 +28,8 @@ def load_general_plugins():

# see https://github.com/vllm-project/vllm/issues/10480
os.environ['TORCHINDUCTOR_COMPILE_THREADS'] = '1'

# see https://github.com/vllm-project/vllm/issues/10619
torch._inductor.config.compile_threads = 1
global plugins_loaded
if plugins_loaded:
return
Expand Down

0 comments on commit 7c2134b

Please sign in to comment.