Comments (11)
Unfortunately, not. Since I am using PyTorch for most of my work, I am no longer reliant on this specific library (docs for PT Cuda are here).
If you do manage to figure out the issue, please do LMK so that I can use it for some of my non-PT work. 👍🏽
So, I actually figured out my issue. I had an old, 32-bit version of Python installed and so I went ahead and uninstalled it, installing a newer 64-bit version (Python 3.12 64-bit). I then re-installed GPUtil and tried everything again (I think it also made me pip install setuptools). Everything now works.
from gputil.
On my machine, the executable existed in System32, but the NVSMI folder did not exist in Program Files\NVIDIA Corporation
and spawn couldn't find the executable, despite it being in System32.
I fixed it by copying the NVSMI folder from an old install that had it.
If you can find them in your System32, the files are MCU.exe
, nvdebugdump.exe
, nvidia-smi.1.pdf
, nvidia-smi.exe
, and nvml.dll
I don't know what files are required but I'd guess the absolute minimum would be nvidia-smi.exe
and nvml.dll
.
from gputil.
Copied just the nvidia-smi.exe and nvml.dll and it seems to have resolved the lack of stats - thanks @wdcook4
from gputil.
Copied just the nvidia-smi.exe and nvml.dll and it seems to have resolved the lack of stats - thanks @wdcook4
Copied them to where?
from gputil.
I had an empty nvsmi folder which I copied these in to. I think if you don't have the nvsmi folder just create it and see...
from gputil.
Is it at a particular location relative to the module or should it be in the PATH
?
from gputil.
from gputil.
Right, thank you. I already have that present, so unsure what's going on...
from gputil.
Little late to the party but this probably has nothing to do with nividia-smi
not being found, though just setting it to nvidia_smi = "%s\\Program Files\\NVIDIA Corporation\\NVSMI\\nvidia-smi.exe" % os.environ['systemdrive']
without a check if that file exists is pretty wild, not to mention handling the exception at the Popen
call by silently returning an empty list.
Instead, you have to take a very, verrryy close look at your output for (base) PS C:\Users\sarth> nvidia-smi.exe
, where you'll find that you used 4402MiB out of 8192MiB, which means at the time of testing, you used 4402/8192 ~ 53.7% of available memory.
The getAvailable()
-function itself first calls getGPUs()
with the aforementioned "interesting" solution to spawn not finding nvidia-smi
. Then, in line 143, it calls getAvailability(..)
to which we pass the default arguments you called getAvailable()
with.
One of these arguments is maxMemory=0.5
. You can probably see where this is going already, but with your aforementioned 4402MiB of used memory out of 8192MiB total memory, you're just above the 50% memory used threshold, which means line 177 puts a 0 for the "availability" of your RTX2080, thus getAvailable()
removes it from the list, ultimately returning an empty list.
from gputil.
Right, thank you. I already have that present, so unsure what's going on...
Did you ever figure out the issue? I have the same problem.
from gputil.
Unfortunately, not. Since I am using PyTorch for most of my work, I am no longer reliant on this specific library (docs for PT Cuda are here).
If you do manage to figure out the issue, please do LMK so that I can use it for some of my non-PT work. 👍🏽
from gputil.
Related Issues (20)
- Crashing if nvidia-smi fails HOT 3
- GPUtil.showUtilization does not work for individual attrList HOT 3
- ImportError: No module named GPUtil HOT 4
- getFirstAvailable(maxMemory=0.9) inconsistent with showUtilization() HOT 1
- Get GPUs that are not used by any other user
- GPU memoryUsage per Process
- Is it possible to get the CUDA version? HOT 1
- Add Kubernetes support through device plugins
- Request: Add all query information from nvidia-smi
- ValueError when nvidia-smi finds no GPU
- Over 60 times slower than nvidia-smi to asses resource usage
- GPUtil doesn't find GPU HOT 1
- showUtilization causes GPU stuttering
- ValueError: invalid literal for int() with base 10: 'No devices were found' HOT 1
- Drop dependency on distutils to support python 3.12 HOT 1
- Pyinstaller exe with console=False causes pop-up window every time nvidia-smi.exe is called HOT 1
- Very new to all of this, please help? HOT 1
- No longer works on Python 3.12 as distutils has been deprecated and removed HOT 2
- Handle nvidia-smi non-zero exit status
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gputil.