Skip to content

Commit b5f92a3

Browse files
authored
Add handling for NVMLError_NotSupported in get_device_memory_info (#5890)
- adds a specific exception handler for NVMLError_NotSupported when attempting to get device memory information via NVML. This improves error handling for systems without dedicated frame buffer Signed-off-by: Janusz Lisiecki <[email protected]>
1 parent 7618bf1 commit b5f92a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dali/test/python/test_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ def get_device_memory_info(device_id=0):
6969
except ModuleNotFoundError:
7070
print("Python bindings for NVML not found")
7171
return None
72+
except pynvml.NVMLError_NotSupported:
73+
print("nvmlDeviceGetMemoryInfo not supported on this system")
74+
return None
7275

7376

7477
def get_gpu_name_from_nvml():

0 commit comments

Comments
 (0)