Skip to content

Commit c1c6ac1

Browse files
committed
refactor: enhance get topology
Signed-off-by: thxCode <[email protected]>
1 parent c51f241 commit c1c6ac1

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

gpustack_runtime/detector/__init__.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,15 @@ def get_devices_topologies(
163163
for manu, devs in group_devices.items():
164164
det = _DETECTORS_MAP.get(manu)
165165
if det is not None:
166-
topo = det.get_topology(devs)
167-
if topo:
168-
topologies.append(topo)
169-
if fast and topologies:
170-
return topologies
166+
try:
167+
topo = det.get_topology(devs)
168+
if topo:
169+
topologies.append(topo)
170+
except Exception:
171+
detect_target = envs.GPUSTACK_RUNTIME_DETECT.lower()
172+
if detect_target == det.name:
173+
raise
174+
debug_log_exception(logger, "Failed to get topology for %s", det.name)
171175
return topologies
172176

173177

0 commit comments

Comments
 (0)