Merge pull request #5061 from crashingalexsan/dev

Pin stable ROCM 7.14, rework multi arch installation
This commit is contained in:
Vladimir Mandic
2026-08-26 10:12:25 +02:00
committed by GitHub
2 changed files with 3 additions and 12 deletions
+2 -5
View File
@@ -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')
+1 -7
View File
@@ -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: