Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lshqqytiger committed Feb 15, 2025
1 parent f8de92e commit 067512b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 7 additions & 2 deletions modules/zluda_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 067512b

Please sign in to comment.