This commit is contained in:
Seunghoon Lee
2025-02-15 11:42:49 +09:00
parent f8de92ed3f
commit 067512b8a3
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -630,7 +630,7 @@ def install_rocm_zluda():
error = None
from modules import zluda_installer
try:
if args.reinstall or zluda_installer.is_old_zluda():
if args.reinstall or zluda_installer.is_reinstall_needed():
zluda_installer.uninstall()
zluda_installer.install()
zluda_installer.set_default_agent(device)
+7 -2
View File
@@ -49,11 +49,16 @@ def set_default_agent(agent: rocm.Agent):
MIOpen_available = is_nightly and agent.gfx_version in (0x908, 0x90a, 0x940, 0x941, 0x942, 0x1030, 0x1100, 0x1101, 0x1102,)
def is_old_zluda() -> bool: # ZLUDA<3.8.8
def is_reinstall_needed() -> bool: # ZLUDA<3.8.8
if not os.path.exists(path):
return False
try:
global nvcuda # pylint: disable=global-statement
if nvcuda is None:
nvcuda = ctypes.windll.LoadLibrary(os.path.join(path, 'nvcuda.dll'))
nvcuda.zluda_get_nightly_flag()
return False
except AttributeError:
except Exception:
return True