From 71be3c7d4547dd4e64e677ee8aea9819c9936a18 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Wed, 11 Jun 2025 15:47:25 +0300 Subject: [PATCH] ROCm don't override gfx with gfx1100 and gfx1101 + rocm 6.4 --- installer.py | 5 ++--- modules/rocm.py | 11 +++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/installer.py b/installer.py index 73f85f010..f1997ec2e 100644 --- a/installer.py +++ b/installer.py @@ -699,13 +699,12 @@ def install_rocm_zluda(): rocm.set_blaslt_enabled(device.blaslt_supported) if device is None or os.environ.get("HSA_OVERRIDE_GFX_VERSION", None) is not None: - log.info(f'ROCm: HSA_OVERRIDE_GFX_VERSION auto config skipped: version={os.environ.get("HSA_OVERRIDE_GFX_VERSION", None)}') + log.info(f'ROCm: HSA_OVERRIDE_GFX_VERSION auto config skipped: device={device.name if device is not None else None} version={os.environ.get("HSA_OVERRIDE_GFX_VERSION", None)}') else: gfx_ver = device.get_gfx_version() if gfx_ver is not None: os.environ.setdefault('HSA_OVERRIDE_GFX_VERSION', gfx_ver) - else: - log.warning(f'ROCm: device={device.name} could not auto-detect HSA version') + log.info(f'ROCm: HSA_OVERRIDE_GFX_VERSION config overridden: device={device.name} version={os.environ.get("HSA_OVERRIDE_GFX_VERSION", None)}') ts('amd', t_start) return torch_command diff --git a/modules/rocm.py b/modules/rocm.py index 7553f3dfc..262c15620 100644 --- a/modules/rocm.py +++ b/modules/rocm.py @@ -81,11 +81,14 @@ class Agent: self.blaslt_supported = os.path.exists(os.path.join(blaslt_tensile_libpath, f"Kernels.so-000-{name}.hsaco" if sys.platform == "win32" else f"extop_{name}.co")) def get_gfx_version(self) -> Union[str, None]: - if self.gfx_version >= 0x1200: - return None # 12.0.1 is RX 9070, 12.0.0 is RX 9060 - elif self.gfx_version >= 0x1100: + if self.gfx_version >= 0x1102 and self.gfx_version < 0x1200: return "11.0.0" - elif self.gfx_version >= 0x1000: + elif self.gfx_version == 0x1101: + if version is None or float(version) < 6.4: + return "11.0.0" # gfx1101 requires rocm 6.4.1 + else: + return None + elif self.gfx_version >= 0x1000 and self.gfx_version < 0x1100: # gfx1010 users had to override gfx version to 10.3.0 in Linux # it is unknown whether overriding is needed in ZLUDA return "10.3.0"