Code Monkey home page Code Monkey logo

Comments (11)

rayanelahmadi avatar rayanelahmadi commented on September 7, 2024 1

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.

jamieslyman avatar jamieslyman commented on September 7, 2024

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.

gchennell avatar gchennell commented on September 7, 2024

Copied just the nvidia-smi.exe and nvml.dll and it seems to have resolved the lack of stats - thanks @wdcook4

from gputil.

sarthakpati avatar sarthakpati commented on September 7, 2024

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.

gchennell avatar gchennell commented on September 7, 2024

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.

sarthakpati avatar sarthakpati commented on September 7, 2024

Is it at a particular location relative to the module or should it be in the PATH?

from gputil.

gchennell avatar gchennell commented on September 7, 2024

from gputil.

sarthakpati avatar sarthakpati commented on September 7, 2024

Right, thank you. I already have that present, so unsure what's going on...

from gputil.

Apfelkuchenbemme avatar Apfelkuchenbemme commented on September 7, 2024

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.

rayanelahmadi avatar rayanelahmadi commented on September 7, 2024

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.

sarthakpati avatar sarthakpati commented on September 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.