ITADN

Use NVIDIA's official pynvml binding

#107Pull Requestwookayin 创建于 2021-08-05
pynvml
W
wookayincommented
Since 2021, NVIDIA provides an official python binding `pynvml`: https://pypi.org/project/nvidia-ml-py/#history which should replace a third-party community fork [nvidia-ml-py3](https://github.com/nicolargo/nvidia-ml-py3) that we have been using. The main motivations are (1) to use an official library and (2) to add MIG support. See #102 for more details. Need to test whether: - The new pynvml API works well on **old & recent** NVIDIA Drivers; maybe some monkey patching needed (see https://github.com/wookayin/gpustat/issues/102#issuecomment-892833816) - The new pynvml API works well on Windows (see #90) /cc @XuehaiPan @Stonesjtu ## Important Changes - The official python bindings `nvidia-ml-py` needs to be installed, not `nvidia-ml-py3`. When the legacy one is installed for some reason, an error will occur: ``` ImportError: pynvml is missing or an outdated version is installed. ``` - To fix this error, please uninstall `nvidia-ml-py3` and install `nvidia-ml-py<=11.495.46` (please follow the instruction in the error message). Or you can [bypass] the validation if you really want. - Due to compatibility reasons, NVIDIA Driver version needs to be 450.66 or higher.
合并状态:未合并 关闭于 2022-07-04 14 条评论