Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving from pynvml to nvidia-ml-py #151

Closed
Tracked by #17
jakirkham opened this issue Feb 14, 2023 · 4 comments · Fixed by #490 · May be fixed by #245
Closed
Tracked by #17

Moving from pynvml to nvidia-ml-py #151

jakirkham opened this issue Feb 14, 2023 · 4 comments · Fixed by #490 · May be fixed by #245
Assignees
Labels
build/test Building and testing the documentation improvement Improves an existing functionality

Comments

@jakirkham
Copy link
Member

jakirkham commented Feb 14, 2023

Currently this is making use of pynvml in a few places:

Alternatively, MIG instance names can be obtained programatically using [NVML](https://developer.nvidia.com/nvidia-management-library-nvml) or [PyNVML](https://github.com/gpuopenanalytics/pynvml). Please refer to the [NVML API](https://docs.nvidia.com/deploy/nvml-api/) to write appropriate utilities for that purpose.

import pynvml
pynvml.nvmlInit()
return pynvml.nvmlDeviceGetName(pynvml.nvmlDeviceGetHandleByIndex(0))

However we would like to move to nvidia-ml-py in the future. Raising this issue to track this work

@jacobtomlinson jacobtomlinson added improvement Improves an existing functionality build/test Building and testing the documentation labels Feb 15, 2023
@hcho3
Copy link
Contributor

hcho3 commented Apr 12, 2023

@jakirkham Is there a Conda package for nvidia-ml-py ?

@jakirkham
Copy link
Member Author

@hcho3 sorry for missing your question 🤦‍♂️

Yeah here's the feedstock in conda-forge

@jacobtomlinson
Copy link
Member

The APIs of pynvml and nvidia-ml-py should be identical(import pynvml; ...) with the exception of pynvml.smi so this should be a quick change.

To close this issue we need to:

  • Check if we install pynvml anywhere and replace it will nvidia-ml-py
  • Check if we link to pynvml anywhere and replace it with a link to nvidia-ml-py
  • Check if we use pynvml.smi anywhere and remove it as that submodule is going away
  • Check any import pynvml; ... code and ensure they still work as expected with nvidia-ml-py installed instead

@jakirkham
Copy link
Member Author

As part of RAPIDS 25.02, we have upgraded to pynvml version 12, which requires/uses nvidia-ml-py under-the-hood

It would be good to recheck the deployment docs and examples work with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/test Building and testing the documentation improvement Improves an existing functionality
Projects
None yet
5 participants