Skip to content

Commit 24522cb

Browse files
Remove Windows CUDA DLL path handling from embed_anything initialization
- Eliminated the CUDA DLL path handling code specific to Windows from the __init__.py file. - This change simplifies the initialization process and reduces platform-specific complexity in the codebase.
1 parent 5f1da9f commit 24522cb

1 file changed

Lines changed: 0 additions & 28 deletions

File tree

python/python/embed_anything/__init__.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -240,34 +240,6 @@
240240
import platform
241241
import os
242242

243-
# Handle CUDA DLL paths on Windows
244-
if platform.system() == "Windows":
245-
# Common CUDA installation paths
246-
cuda_paths = [
247-
r"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6/bin",
248-
r"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.5/bin",
249-
r"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.4/bin",
250-
r"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.3/bin",
251-
r"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/bin",
252-
r"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/bin",
253-
r"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.0/bin",
254-
r"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/bin",
255-
r"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.7/bin",
256-
r"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/bin",
257-
]
258-
259-
# Try to find and add CUDA path
260-
cuda_found = False
261-
for cuda_path in cuda_paths:
262-
if os.path.exists(cuda_path):
263-
os.add_dll_directory(cuda_path)
264-
cuda_found = True
265-
break
266-
267-
if not cuda_found:
268-
print("Warning: CUDA DLL directory not found. If you encounter DLL loading issues, "
269-
"please ensure CUDA is installed and add its bin directory to the system path.")
270-
271243
from .vectordb import *
272244
from ._embed_anything import *
273245
import onnxruntime

0 commit comments

Comments
 (0)