mirror of
https://github.com/handsomezhuzhu/vllm-npu-plugin.git
synced 2026-02-20 19:50:15 +00:00
14 lines
367 B
Python
14 lines
367 B
Python
import sys
|
|
|
|
import vllm.distributed.utils
|
|
from vllm.platforms import CpuArchEnum, Platform
|
|
|
|
is_arm = (Platform.get_cpu_architecture() == CpuArchEnum.ARM)
|
|
|
|
USE_SCHED_YIELD = (
|
|
((sys.version_info[:3] >= (3, 11, 1)) or
|
|
(sys.version_info[:2] == (3, 10) and sys.version_info[2] >= 8))
|
|
and not is_arm)
|
|
|
|
vllm.distributed.utils.USE_SCHED_YIELD = USE_SCHED_YIELD
|