Skip to content

Commit

Permalink
Support pynvml>=11.5 in WSL (#8962)
Browse files Browse the repository at this point in the history
* move decode into try block

* use _maybe_decode

* address code review
  • Loading branch information
rjzamora authored Dec 11, 2024
1 parent 6eabc90 commit 3ef88b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion distributed/diagnostics/nvml.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from packaging.version import parse as parse_version

import dask
from dask.utils import ensure_unicode

try:
import pynvml
Expand Down Expand Up @@ -105,7 +106,7 @@ def init_once():
return

if _in_wsl() and parse_version(
pynvml.nvmlSystemGetDriverVersion().decode()
ensure_unicode(pynvml.nvmlSystemGetDriverVersion())
) < parse_version(MINIMUM_WSL_VERSION):
NVML_STATE = NVMLState.DISABLED_WSL_INSUFFICIENT_DRIVER
return
Expand Down

0 comments on commit 3ef88b3

Please sign in to comment.