File tree Expand file tree Collapse file tree 1 file changed +1
-25
lines changed
vllm/distributed/device_communicators Expand file tree Collapse file tree 1 file changed +1
-25
lines changed Original file line number Diff line number Diff line change 5
5
"""
6
6
7
7
import ctypes
8
- import glob
9
8
from dataclasses import dataclass
10
9
from typing import Any , Dict , List , Optional
11
10
@@ -62,29 +61,6 @@ def find_loaded_library(lib_name) -> Optional[str]:
62
61
return path
63
62
64
63
65
- def get_cudart_lib_path_from_env () -> Optional [str ]:
66
- """
67
- In some system, find_loaded_library() may not work. So we allow users to
68
- specify the path through environment variable VLLM_CUDART_SO_PATH.
69
- """
70
- cudart_so_env = envs .VLLM_CUDART_SO_PATH
71
- if cudart_so_env is not None :
72
- cudart_paths = [
73
- cudart_so_env ,
74
- ]
75
- for path in cudart_paths :
76
- file_paths = glob .glob (path )
77
- if len (file_paths ) > 0 :
78
- logger .info (
79
- "Found cudart library at %s through env var"
80
- "VLLM_CUDART_SO_PATH=%s" ,
81
- file_paths [0 ],
82
- cudart_so_env ,
83
- )
84
- return file_paths [0 ]
85
- return None
86
-
87
-
88
64
class CudaRTLibrary :
89
65
exported_functions = [
90
66
# cudaError_t cudaSetDevice ( int device )
@@ -131,7 +107,7 @@ def __init__(self, so_file: Optional[str] = None):
131
107
if so_file is None :
132
108
so_file = find_loaded_library ("libcudart" )
133
109
if so_file is None :
134
- so_file = get_cudart_lib_path_from_env ()
110
+ so_file = envs . VLLM_CUDART_SO_PATH # fallback to env var
135
111
assert so_file is not None , \
136
112
(
137
113
"libcudart is not loaded in the current process, "
You can’t perform that action at this time.
0 commit comments