Skip to content

Commit eb3ae7d

Browse files
authored
Drop nvml submodule
The `pynvml.nvml` namespace wasn't needed in PyNVML 11 and does not exist in PyNVML 12. So drop the `nvml` and use `pynvml` directly.
1 parent 3e31119 commit eb3ae7d

File tree

1 file changed

+3
-3
lines changed
  • jupyterlab_nvdashboard/apps

1 file changed

+3
-3
lines changed

jupyterlab_nvdashboard/apps/gpu.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
try:
77
pynvml.nvmlInit()
8-
except pynvml.nvml.NVMLError_LibraryNotFound:
8+
except pynvml.NVMLError_LibraryNotFound:
99
ngpus = 0
1010
gpu_handles = []
1111
else:
@@ -29,12 +29,12 @@
2929
max(sum(i.value.ullVal for i in bw) * 1024**2 for bw in bandwidth)
3030
/ 2
3131
)
32-
except (IndexError, pynvml.nvml.NVMLError_NotSupported):
32+
except (IndexError, pynvml.NVMLError_NotSupported):
3333
nvlink_ver = None
3434
max_bw = []
3535
try:
3636
pci_gen = pynvml.nvmlDeviceGetMaxPcieLinkGeneration(gpu_handles[0])
37-
except (IndexError, pynvml.nvml.NVMLError_NotSupported):
37+
except (IndexError, pynvml.NVMLError_NotSupported):
3838
pci_gen = None
3939

4040

0 commit comments

Comments
 (0)