Skip to content

Commit 107fd46

Browse files
committed
removed deprecated API call
1 parent 84f24f2 commit 107fd46

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

nodescraper/plugins/inband/amdsmi/amdsmi_collector.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,8 @@ def _to_int(x: Any, default: int = 0) -> int:
291291
for idx, h in enumerate(devices):
292292
bdf = self._smi_try(amdsmi.amdsmi_get_gpu_device_bdf, h, default="") or ""
293293
uuid = self._smi_try(amdsmi.amdsmi_get_gpu_device_uuid, h, default="") or ""
294-
kfd = self._smi_try(amdsmi.amdsmi_get_gpu_kfd_info, h, default={}) or {}
295-
296294
kfd = self._smi_try(amdsmi.amdsmi_get_gpu_kfd_info, h, default={}) or {}
297295
partition_id = 0
298-
if isinstance(kfd, dict):
299-
try:
300-
partition_id = int(kfd.get("current_partition_id", 0) or 0)
301-
except Exception:
302-
partition_id = 0
303296

304297
try:
305298
out.append(
@@ -692,12 +685,9 @@ def get_static(self) -> Optional[list[AmdSmiStatic]]:
692685
numa_node = int(kfd.get("node_id", 0) or 0)
693686
except Exception:
694687
numa_node = 0
695-
try:
696-
affinity = int(kfd.get("cpu_affinity", 0) or 0)
697-
except Exception:
698-
affinity = 0
699688
else:
700-
numa_node, affinity = 0, 0
689+
numa_node = 0
690+
affinity = 0
701691
numa_model = StaticNuma(node=numa_node, affinity=affinity)
702692

703693
# VRAM

test/unit/plugin/test_amdsmi_collector.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ def amdsmi_get_processor_handles():
8181
m.amdsmi_get_gpu_kfd_info = lambda h: {
8282
"kfd_id": 7,
8383
"node_id": 3,
84-
"cpu_affinity": 0xFF,
85-
"current_partition_id": 0,
8684
}
8785
m.amdsmi_get_gpu_board_info = lambda h: {
8886
"vbios_name": "vbiosA",

0 commit comments

Comments
 (0)