Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions gpustack_runtime/detector/iluvatar.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,16 @@ def detect(self) -> Devices | None:
dev_mem = 0
dev_mem_used = 0
dev_mem_status = DeviceMemoryStatusEnum.HEALTHY
with contextlib.suppress(pyixml.NVMLError):
dev_mem_info = pyixml.nvmlDeviceGetMemoryInfo(dev)
dev_mem = byte_to_mebibyte( # byte to MiB
dev_mem_info.total,
)
dev_mem_used = byte_to_mebibyte( # byte to MiB
dev_mem_info.used,
)
Comment thread
thxCode marked this conversation as resolved.
if not envs.GPUSTACK_RUNTIME_DETECT_NO_HEALTH_CHECK:
with contextlib.suppress(pyixml.NVMLError):
dev_mem_info = pyixml.nvmlDeviceGetMemoryInfo(dev)
dev_mem = byte_to_mebibyte( # byte to MiB
dev_mem_info.total,
)
dev_mem_used = byte_to_mebibyte( # byte to MiB
dev_mem_info.used,
)
dev_health = pyixml.ixmlDeviceGetHealth(dev)
if dev_health != pyixml.IXML_HEALTH_OK:
dev_mem_status = DeviceMemoryStatusEnum.UNHEALTHY
Expand Down
Loading