From a0fd8210aa4693d23899a47fda63d3e014308818 Mon Sep 17 00:00:00 2001 From: Seunghoon Lee Date: Thu, 21 Mar 2024 11:23:50 +0900 Subject: [PATCH] fix zluda torch patcher --- installer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/installer.py b/installer.py index de70a12da..6341d0580 100644 --- a/installer.py +++ b/installer.py @@ -954,7 +954,10 @@ def patch_zluda(): if zluda_path is None: log.warning('Failed to automatically patch torch with ZLUDA. Could not find ZLUDA from PATH.') return - venv_dir = os.environ.get('VENV_DIR', os.path.dirname(shutil.which('python'))) + python_dir = os.path.dirname(shutil.which('python')) + if shutil.which('conda') is None: + python_dir = os.path.dirname(python_dir) + venv_dir = os.environ.get('VENV_DIR', python_dir) dlls_to_patch = { 'cublas.dll': 'cublas64_11.dll', #'cudnn.dll': 'cudnn64_8.dll',