From 265a09a341739b8cce03004b0132e50458f45432 Mon Sep 17 00:00:00 2001 From: LeoBorcherding Date: Mon, 11 May 2026 00:27:10 -0500 Subject: [PATCH] fix: guard reconcile call against None numeric_ids; add torchvision lower bounds --- studio/backend/utils/hardware/hardware.py | 7 +++---- studio/install_python_stack.py | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/studio/backend/utils/hardware/hardware.py b/studio/backend/utils/hardware/hardware.py index 94787d4d95..747ff194ab 100644 --- a/studio/backend/utils/hardware/hardware.py +++ b/studio/backend/utils/hardware/hardware.py @@ -662,11 +662,10 @@ def get_visible_gpu_utilization() -> Dict[str, Any]: ) if result is not None: result["backend"] = _backend_label(device) - if IS_ROCM: + numeric_ids = parent_visible_spec.get("numeric_ids") + if IS_ROCM and numeric_ids is not None: # Fix unified-memory VRAM on AMD iGPUs (Strix Halo etc.) - _reconcile_rocm_unified_memory( - result, parent_visible_spec["numeric_ids"] - ) + _reconcile_rocm_unified_memory(result, numeric_ids) return result # Torch-based fallback for CUDA (nvidia-smi unavailable, AMD ROCm) and XPU (Intel) diff --git a/studio/install_python_stack.py b/studio/install_python_stack.py index 8af5fe3829..1e71ee8661 100644 --- a/studio/install_python_stack.py +++ b/studio/install_python_stack.py @@ -61,8 +61,8 @@ _ROCM_TORCH_PKG_SPECS: dict[str, tuple[str, str, str]] = { # Default for rocm7.1 and earlier: torch 2.x below 2.11 "_default": ( "torch>=2.4,<2.11.0", - "torchvision<0.26.0", - "torchaudio<2.11.0", + "torchvision>=0.19,<0.26.0", + "torchaudio>=2.4,<2.11.0", ), } _PYTORCH_WHL_BASE = (