Skip to content

Commit fddcc3b

Browse files
mgoinlulmer
authored andcommitted
[Bugfix] Restrict MacOS CPU detection (vllm-project#14210)
Signed-off-by: mgoin <mgoin64@gmail.com> Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
1 parent 25eeb04 commit fddcc3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vllm/platforms/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ def cpu_platform_plugin() -> Optional[str]:
160160
logger.debug("Confirmed CPU platform is available because"
161161
" vLLM is built with CPU.")
162162
if not is_cpu:
163-
import platform
164-
is_cpu = platform.machine().lower().startswith("arm")
163+
import sys
164+
is_cpu = sys.platform.startswith("darwin")
165165
if is_cpu:
166166
logger.debug("Confirmed CPU platform is available"
167-
" because the machine is ARM.")
167+
" because the machine is MacOS.")
168168

169169
except Exception as e:
170170
logger.debug("CPU platform is not available because: %s", str(e))

0 commit comments

Comments
 (0)