Skip to content

Commit

Permalink
[CI/Build][Bugfix] Fix CPU backend default threads num (vllm-project#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bigPYJ1151 authored Feb 11, 2025
1 parent 2b25b7d commit 565c1ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vllm/platforms/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
# Environment variables for CPU executor
#

# Set default threads num for OpenMP parallel
os.environ["OMP_NUM_THREADS"] = str(torch.get_num_threads())

# Disable torch async compiling which won't work with daemonic processes
os.environ["TORCHINDUCTOR_COMPILE_THREADS"] = "1"

Expand Down

0 comments on commit 565c1ef

Please sign in to comment.