From efcaccbbcf84fab72163b8e89cd9b7980dcb8543 Mon Sep 17 00:00:00 2001 From: LeoBorcherding Date: Wed, 6 May 2026 20:53:54 -0500 Subject: [PATCH] fix: prevent torchao overrides step from overwriting AMD ROCm torch torchao==0.14.0 in overrides.txt declares torch as a dependency. Without --no-deps, uv resolves torch from PyPI and installs 2.11.0+cpu on top of the AMD ROCm wheels (2.9.0+rocmsdk20251116). This was the root cause of 'Hardware detected: CPU' -- the AMD wheels were installed but then immediately overwritten by the overrides step. When _rocm_windows_torch_installed is True, add --no-deps to the overrides pip_install call so torchao is installed without pulling in CPU torch. --- studio/install_python_stack.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/studio/install_python_stack.py b/studio/install_python_stack.py index cedbb8058d..1a774e1f5c 100644 --- a/studio/install_python_stack.py +++ b/studio/install_python_stack.py @@ -1228,10 +1228,17 @@ def install_python_stack() -> int: _progress("dependency overrides (skipped, no torch)") else: _progress("dependency overrides") + _override_extra_args: tuple[str, ...] = () + if _rocm_windows_torch_installed: + # torchao in overrides.txt declares torch as a dependency; without + # --no-deps uv would resolve and install CPU torch from PyPI, + # overwriting the AMD ROCm wheels we just installed. + _override_extra_args = ("--no-deps",) pip_install( "Installing dependency overrides", "--force-reinstall", "--no-cache-dir", + *_override_extra_args, req = REQ_ROOT / "overrides.txt", )