Skip to content

Commit 92284f3

Browse files
committed
Add HIP_PATH to dll search directories for windows users.
1 parent 2b0d3f3 commit 92284f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llama_cpp/llama_cpp.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ def _load_shared_library(lib_base_name: str):
6262
if "CUDA_PATH" in os.environ:
6363
os.add_dll_directory(os.path.join(os.environ["CUDA_PATH"], "bin"))
6464
os.add_dll_directory(os.path.join(os.environ["CUDA_PATH"], "lib"))
65+
if "HIP_PATH" in os.environ:
66+
os.add_dll_directory(os.path.join(os.environ["HIP_PATH"], "bin"))
67+
os.add_dll_directory(os.path.join(os.environ["HIP_PATH"], "lib"))
6568
cdll_args["winmode"] = ctypes.RTLD_GLOBAL
6669

6770
# Try to load the shared library, handling potential errors

0 commit comments

Comments
 (0)