mirror of
https://github.com/handsomezhuzhu/vllm-npu-plugin.git
synced 2026-02-20 19:50:15 +00:00
大改
This commit is contained in:
13
vllm_npu/patch/platform/patch_sched_yield.py
Normal file
13
vllm_npu/patch/platform/patch_sched_yield.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
Reference in New Issue
Block a user