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 55"""
66
77import ctypes
8- import glob
98from dataclasses import dataclass
109from typing import Any , Dict , List , Optional
1110
@@ -62,29 +61,6 @@ def find_loaded_library(lib_name) -> Optional[str]:
6261 return path
6362
6463
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-
8864class CudaRTLibrary :
8965 exported_functions = [
9066 # cudaError_t cudaSetDevice ( int device )
@@ -131,7 +107,7 @@ def __init__(self, so_file: Optional[str] = None):
131107 if so_file is None :
132108 so_file = find_loaded_library ("libcudart" )
133109 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
135111 assert so_file is not None , \
136112 (
137113 "libcudart is not loaded in the current process, "
You can’t perform that action at this time.
0 commit comments