A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 23:30 UTC
[Bugfix] Do not use resource module on Windows (#12858) (#13029)
MoonRide303 committed
Feb 11, 2025 at 17:21 UTC
21f5d50fa557f431e9c76d432771337f5399c420
1 file changed
+5
-1
vllm/utils.py
+5
-1
@@ -15,7 +15,6 @@ import ipaddress
15
import multiprocessing
16
import os
17
import re
18
-import resource
18
import signal
19
import socket
20
import subprocess
@@ -2070,6 +2069,11 @@ def memory_profiling(
2069
2070
# Adapted from: https://github.com/sgl-project/sglang/blob/v0.4.1/python/sglang/srt/utils.py#L630 # noqa: E501
2071
def set_ulimit(target_soft_limit=65535):
2072
+ if sys.platform.startswith('win'):
2073
+ logger.info("Windows detected, skipping ulimit adjustment.")
2074
+ return
2075
+
2076
+ import resource
2077
resource_type = resource.RLIMIT_NOFILE
2078
current_soft, current_hard = resource.getrlimit(resource_type)
2079