diff --git a/inference/core/devices/utils.py b/inference/core/devices/utils.py index f1ca572bd..b4d7891f2 100644 --- a/inference/core/devices/utils.py +++ b/inference/core/devices/utils.py @@ -25,7 +25,7 @@ def get_gpu_id(): Optional[int]: GPU ID if available, None otherwise. """ try: - from pynvml import nvmlInit, nvmlDeviceGetCount + from pynvml import nvmlDeviceGetCount, nvmlInit nvmlInit() gpus_count = nvmlDeviceGetCount()