Skip to content

Commit

Permalink
Avoid torch compile for XPU platform
Browse files Browse the repository at this point in the history
Signed-off-by: yan ma <[email protected]>
  • Loading branch information
yma11 committed Nov 28, 2024
1 parent 3ed5e73 commit 3ecf6de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vllm/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import torch

import vllm.envs as envs
from vllm.platforms import current_platform

logger = logging.getLogger(__name__)

Expand All @@ -25,6 +26,8 @@ def load_general_plugins():
os.environ['TORCHINDUCTOR_COMPILE_THREADS'] = '1'
# see https://github.com/vllm-project/vllm/issues/10619
torch._inductor.config.compile_threads = 1
if current_platform.is_xpu():
os.environ['TORCH_COMPILE_DISABLE'] = 'True'
global plugins_loaded
if plugins_loaded:
return
Expand Down

0 comments on commit 3ecf6de

Please sign in to comment.