OK so here is the status of the items you asked me to do
#1: Does it work better if you remove
nvidia-ml-py3
and install this version instead:
GitHub - fbcotter/py3nvml: Python 3 Bindings for NVML library. Get NVIDIA GPU status inside your program. - only pip version is available.
I did conda uninstall nvidia-ml-py3 --force followed by pip install py3nvml.
I get the following errors
In any case that library has the same issue. So I sent the PR for the fix.
#2: I split off the python workaround in its own module, so that a normal user won’t need to have a working nvml to use fastai. So, please install the git version of fastai and let me know whether this removed the issue.
I did the above and an confirm the following
- Just importing fastai.vision doesn’t give the “unable to load nvml.dll” error
- Importing fastai.utils.mem does give the error
- With my fix (monkey patched at site-packages), running gpu_mem_get_all() gives the same result as nvidia-smi.exe
In short with my patch, both your objectives are achieved on Windows 10.
#3: Once nvidia-ml-py3 PR accepted please ask the maintainer to make a new release. I will make a new build. Just let me know when it’s ready.
I sent the PR. Though the maintainer is active on github, nvidia-ml-py3 itself was last updated ~2 years back. So I am not sure when this will get it.
We can certainly wait a bit. However since fastai v1 has a hard dependency on nvidia-ml-py3 and we are releasing nvidia-ml-py3 in through the fastai conda channel, it will be prudent to pull the above into fastai org and release it from there.