From 67bd2a1609c12cc0dc07e080b3172ba44c546c6c Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Sat, 17 Oct 2026 18:21:43 +0200 Subject: [PATCH] hip_archs_present: an explicit kfd folder is always read (the Windows adapter lookup only replaces the default Linux one) --- strata_control/engine_component.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/strata_control/engine_component.py b/strata_control/engine_component.py index 0cf2bc2e..b8c55442 100644 --- a/strata_control/engine_component.py +++ b/strata_control/engine_component.py @@ -536,12 +536,14 @@ def cuda_archs_present(environ=None) -> list[str]: return found -def hip_archs_present(kfd_root: str = "/sys/class/kfd/kfd/topology/nodes") -> list[str]: +def hip_archs_present(kfd_root: str | None = None) -> list[str]: """``gfxNNNN`` for each AMD GPU the Linux kernel driver lists (``gfx_target_version`` is MMmmss: gfx1201 = 120001, gfx1103 = 110003, gfx90a = 90010); Windows: from the display adapters' PCI ids (integrated Radeons left out); empty when it cannot say (no amdgpu/kfd, no permission, an id not in the table).""" - if os.name == "nt": - return sorted({c["arch"] for c in windows_amd_cards() if c["arch"]}) + if kfd_root is None: + if os.name == "nt": + return sorted({c["arch"] for c in windows_amd_cards() if c["arch"]}) + kfd_root = "/sys/class/kfd/kfd/topology/nodes" found = [] try: nodes = sorted(Path(kfd_root).iterdir())