From 3edaed8e777e2b94557dfb436320a954a6fbd885 Mon Sep 17 00:00:00 2001 From: Alejandro Alberto Aguilar Morales Date: Wed, 26 Aug 2026 01:17:54 -0600 Subject: [PATCH] Pin stable ROCM 7.14, rework multi arch installation --- installer.py | 7 ++----- modules/rocm.py | 8 +------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/installer.py b/installer.py index e3c8ba58d..141f56e27 100644 --- a/installer.py +++ b/installer.py @@ -701,7 +701,7 @@ def install_rocm_zluda(): if sys.platform == "win32" and (not args.use_zluda) and (device is not None) and (device.therock is not None) and not installed("rocm"): check_python(supported_minors=[11, 12, 13], reason='ROCm-Windows: python==3.11/3.12/3.13 required') - install("rocm-sdk-devel --index-url https://rocm.nightlies.amd.com/whl-multi-arch") + install("rocm[devel]==7.14.0 --index-url https://repo.amd.com/rocm/whl-multi-arch/") rocm.refresh() msg = f'ROCm: version={rocm.version}' @@ -737,11 +737,8 @@ def install_rocm_zluda(): log.error('ROCm: no agent found - make sure that graphics driver is installed and up to date') if device is not None and device.therock is not None: check_python(supported_minors=[11, 12, 13], reason='ROCm-Windows: python==3.11/3.12/3.13 required') - # Extract device-specific package family from therock path (e.g., 'amd-torch-device-gfx1030' from 'whl-multi-arch/amd-torch-device-gfx1030') - torch_family = device.therock.rsplit('/', 1)[-1] - torchvision_family = torch_family.replace('amd-torch-device-', 'amd-torchvision-device-') # Use device-specific index for torch/torchvision, with root index as fallback for torchaudio and other packages - torch_command = os.environ.get('TORCH_COMMAND', f'{torch_family} {torchvision_family} torchaudio --index-url https://rocm.nightlies.amd.com/{device.therock} --extra-index-url https://rocm.nightlies.amd.com/whl-multi-arch') + torch_command = os.environ.get('TORCH_COMMAND', f'"torch[device-{device.therock}]==2.12.0+rocm7.14.0" "torchvision[device-{device.therock}]==0.27.0+rocm7.14.0" "torchaudio==2.11.0+rocm7.14.0" --index-url https://repo.amd.com/rocm/whl-multi-arch/') elif isinstance(rocm.environment, rocm.PythonPackageEnvironment): check_python(supported_minors=[11, 12, 13], reason='ROCm-Windows: python==3.11/3.12/3.13 required') torch_command = os.environ.get('TORCH_COMMAND', 'torch torchvision torchaudio --index-url https://rocm.nightlies.amd.com/whl-multi-arch') diff --git a/modules/rocm.py b/modules/rocm.py index 2ecdcd29c..8966cddbe 100644 --- a/modules/rocm.py +++ b/modules/rocm.py @@ -136,13 +136,7 @@ class Agent: if self.gfx_version is None: return None gfx = self.name if self.name.startswith("gfx") else f"gfx{self.gfx_version:04x}" - if self.gfx_version & 0xFFF0 in (0x1200, 0x1100): - return f"whl-multi-arch/amd-torch-device-{gfx}" - if self.gfx_version in (0x1150, 0x1151, 0x1152, 0x1153): - return f"whl-multi-arch/amd-torch-device-{gfx}" - if self.gfx_version in (0x1030, 0x1031, 0x1032, 0x1033, 0x1034, 0x1035, 0x1036): - return f"whl-multi-arch/amd-torch-device-{gfx}" - return None + return gfx def get_gfx_version(self) -> str | None: if self.gfx_version is None: